Plugin file and functions
来源:互联网 发布:兄弟连php pdf 编辑:程序博客网 时间:2024/05/16 17:51
Plugin files
1. Npapi.h
declaration of NPP_XXX and NPN_XXX, also NPP and NPStream
in external/webkit/webcore/bridge/Npapi.h
2.Npfunctions.h
declaration function pointer of NPP_XXX and NPN_XXX, like NPP_XXXProcPtr and NPN_XXXProcPtr,
also define structor holding these pointers
in external/webkit/webcore/plugins/Npfunctions.h
3.Npapi.cpp
definition of all NPN_XXX functions, some are directly defined, some are calling function in
other files such as ANPSystemInterface.cpp/ANPPathInterface.cpp and so on.
4. platform porting
PluginPackage.h PluginPackage.cpp PluginPackageAndroid.cpp
PluginView.h PluginView.cpp PluginViewAndroid.cpp
ps:webkit platform adapting
A class with one .h file and two .cpp file
one cpp for generic function, the other cpp is for the specific Platform, like the examples above.
PluginFunction
1. function name
NPN_XXX, function defined in the browser and passed in to plugin.
NPP_XXX, function defined in the plugin and called by the browser.
2. NP_GetValue and NPP_GetValue
NP_GetValue is a dll function exposed to the caller, get discribtion of the plugin.
NPP_GetValue is a function of plugin structure and will passed to the browser, called by the structure pointer, get object of the plugin.
3.NP_GetMIMEDescription,return the mime type discribtion
the return value may be many parts seperated by ";" and each part has three items seperated by":" which are
a. mimetype
b.file extentions
c.readable discribtion
4. the place "NPP_XXX" function is called
a.NP_Initialize¡ NP_GetValue called through "dlsym"
b.NPP_New newp PluginView::start
c.NPP_SetWindow setwindow PluginView::setNPWindowIfNeeded
d.NPP_NewStream newstream PluginStream::startStream
e.NPP_StreamAsFile asfile PluginStream::destroyStream
f.NPP_Write write PluginStream::deliverData()
g.NPP_HandleEvent event PluginWidgetAndroid::sendEvent
h.NPP_URLNotify urlnotify PluginView::performRequest
PluginStream::destroyStream
i.NPP_GetValue getvalue PluginView::npObject..
g.NPP_SetValue setvalue PluginView::privateBrowsingStateChanged
others
a.
pluginViewForInstance(),get PluginView.
it was exposed in the "NPN" function, and registed to the NP function
b.
NP_Initialize,function in lib.
NP_Initialize(m_browserFuncs), initialize with browser function.
requestTimerFired(it's a timer, it will be created at PluginView's constructor function)
performRequest (working mode, put a request to a queue and start a timer 0, handle the request in the timer out fun)
- Plugin file and functions
- File Management functions
- File Functions--文件函数
- Stored Procedures and Functions
- URL functions and classes
- jquery selectors and functions
- JQuery Callback and Functions
- Friend functions and classes
- static variables and functions
- access and faccessat Functions
- truncate and ftruncate Functions
- rename and renameat Functions
- Inheritance and virtual functions
- kill and raise Functions
- alarm and pause Functions
- STACK AND FUNCTIONS
- HDU6061 RXD and functions
- c++ friend functions and inline functions
- __attribute__ ((cleanup(xxx))) -- gcc extension
- 存储过程(一)-----格式框架
- svn 命令
- svn 命令及其示例
- 使用MapAndLoad来看可执行文件的段结构
- Plugin file and functions
- ural 1020 Rope
- linux修改计算机名
- 在Spring DM中使用Annotations发布和引用服务
- SVN服务器几种备份策略----------重点svnsync备份
- 2011年年终总结
- php编辑器
- .Net Framework 数据提供程序错误
- NYOJ--187快速查找素数