A simple hello world NPAPI plugin for Google Chrome?

家住魔仙堡 提交于 2019-12-17 10:26:19

问题


I am trying to make a chrome plugin but Chrome API doesn't give me enough power. I want to use NPAPI but I have no idea how to use it but I do have experience in Visual C++.

Can someone show me a 'Hello world' in C++ application so I can get started?


回答1:


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 plugins shouldn't be browser specific (at least as far as possible). Seamonkeys npruntime sample can be considered a basic Hello World for NPAPI. If you care about up-to-date Mac support, you need to take a look at WebKits or Apples samples.

Reading material to get you started:

  • Building a FireFox plugin - 3 part introduction to NPAPI
  • Gecko Plugin API reference - NPAPI documentation at MDC
  • Mac specific info on MDC

There is also the FireBreath project: It is a framework aiming at lowering the entry barrier to browser plugin development and already takes care of most common tasks and issues.




回答2:


Here is a simple cross platform example: npsimple



来源:https://stackoverflow.com/questions/2652034/a-simple-hello-world-npapi-plugin-for-google-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!