Giter VIP home page Giter VIP logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Josh, this is part of the whole section that I don't think should be in the 
file, and doesn't exist in the WebKit and Chromium versions. Why does Gecko 
need it, and can it be moved to another file?

Original comment by stuart.morgan on 28 Jan 2012 at 8:21

from npapi-sdk.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
We do use them in Gecko, but we can probably just move that stuff to another 
file. I'd probably r+ a patch for npapi-sdk that removed the definitions. A 
patch may need to fix sample code in npapi-sdk.

Original comment by [email protected] on 29 Jan 2012 at 4:18

from npapi-sdk.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
There might be justification for not separating function pointers typedefs from 
function's declarations, in that if function declaration changes, appropriate 
typedef should also change. But NP_* functions will hardly ever change, so 
separation will probably make no harm.

As of how to implement it, there are two options: define guard or separate file.
With define guard approach there should be changes required for plugin side or 
browser side. With separate file approach there should be changes for plugin 
side.

I would not make changes required for plugin side because there are a way to 
more plugins than browsers, so I'd prefer the define guard approach. But the 
separate file approach is definitely better.

There can be a mix of those two:

We can add two files: npapi_plugin.h and npapi_browser.h. In one file there 
will be "define NPAPI_SDK_PLUGIN" and "define NPAPI_SDK_BROWSER" in another. 
npfunctions.h would generate an error if neither of these are defined.

Original comment by [email protected] on 29 Jan 2012 at 5:04

from npapi-sdk.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
I'm fine with the guards approach, that does make it easier for existing code. 
Lets not create any new files though. That's an unnecessary pain.

Thanks for looking into this.

Original comment by [email protected] on 29 Jan 2012 at 5:23

from npapi-sdk.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
Ok, so where such guard should be defined? In browser/plugin or both? I 
wouldn't change plugin code, not only because there are more plugins than 
browsers, but also because, IMO, a compile time error should be generated if 
client doesn't define a guard. What do you think?

Original comment by [email protected] on 29 Jan 2012 at 5:51

from npapi-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.