如何编写浏览器插件? [英] How to write a browser plugin?
问题描述
我很好奇为浏览器(如Chrome,Safari和Opera)编写浏览器插件的过程。我在这里特别考虑Windows,并且更喜欢使用C ++。
I'm curious as to the procedure for writing browser plugins for browsers like Chrome, Safari, and Opera. I'm thinking specifically of Windows here and would prefer working with C++.
有没有详细的过程的工具或教程?
Are there any tools or tutorials that detail the process?
注意:我不是指扩展程序或附件。我指的是类似于Flash和Adobe Reader具有插件来处理特定内容类型的插件。
Note: I am not referring to extensions or 'addons'. I'm referring to a plugin similar to how Flash and Adobe Reader have plugins to handle specific content-types.
推荐答案
正如其他人所指出的,这些浏览器的插件是使用 NPAPI 编写的。
As others point out, plugins for those browser are written using the NPAPI.
注意:Firefox和Chrome都会默认大多数插件即将开始点击播放,Chrome计划完全淘汰NPAPI 。
Note: Both Firefox and Chrome will default most plugins to click-to-play soon, with Chrome planning to phase out NPAPI entirely. NPAPI for new projects is discouraged at this point.
开始使用NPAPI的资源:
Resources for getting started with NPAPI:
- MDC插件部分
- 第三部分NPAPI教程
- NPAPI中的记忆体管理
- npsimple - NPAPI插件的Hello World
- npapi-sdk - 规范NPAPI标头的来源
- Mozillas测试插件 - 有助于查找特定NPAPI用例
- MDC plugin section
- three part NPAPI tutorial
- memory management in NPAPI
- npsimple - the "Hello World" of NPAPI plugins
- npapi-sdk - the source for the canonical NPAPI headers
- Mozillas test plugin - good for looking up specific NPAPI use cases
然而,NPAPI本身是相对较低级的,但是有一些工具和框架可以帮助你:
The NPAPI itself is however relatively low-level, but there are tools and frameworks that can help you with it:
- a href =http://firebreath.org/> FireBreath - 跨浏览器,跨平台的插件工作
- Nixysa - 为NPAPI插件生成胶合代码
- JUCE - 应用程序框架也为插件提供支持
- QtBrowserPlugin - 基于Qt的浏览器插件框架
- FireBreath - cross-browser, cross-platform frame-work for plugins
- Nixysa - generate glue-code for NPAPI plugins
- JUCE - application framework also providing support for plugins
- QtBrowserPlugin - Qt based browser plugin framework
这篇关于如何编写浏览器插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!