Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: tests/translation_service/hello_world_module.cc

Issue 3356014: HTTP service that converts *.bc to *.nexe.... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright 2010 The Native Client SDK Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #include <nacl/npupp.h>
6
7 // These functions are called when a module instance is first loaded, and when
8 // the module instance is finally deleted. They must use C-style linkage.
9
10 extern "C" {
11 // Populates |plugin_funcs| by calling InitializePluginFunctions.
12 // Declaration: npupp.h
13 // Web Reference: N/A
14 NPError NP_GetEntryPoints(NPPluginFuncs* plugin_funcs) {
15 NPError InitializePluginFunctions(NPPluginFuncs* plugin_funcs);
16 return InitializePluginFunctions(plugin_funcs);
17 }
18
19
20 // Some platforms, including Native Client, use the two-parameter version of
21 // NP_Initialize(), and do not call NP_GetEntryPoints(). Others (Mac, e.g.)
22 // use single-parameter version of NP_Initialize(), and then call
23 // NP_GetEntryPoints() to get the NPP functions. Also, the NPN entry points
24 // are defined by the Native Client loader, but are not defined in the trusted
25 // plugin loader (and must be filled in in NP_Initialize()).
26
27 // Called when the first instance of this plugin is first allocated to
28 // initialize global state. The browser is hereby telling the plugin its
29 // interface in |browser_functions| and expects the plugin to populate
30 // |plugin_functions| in return. Memory allocated by this function may only
31 // be cleaned up by NP_Shutdown.
32 // returns an NPError if anything went wrong.
33 // Declaration: npupp.h
34 // Documentation URL: https://developer.mozilla.org/en/NP_Initialize
35 NPError NP_Initialize(NPNetscapeFuncs* browser_functions,
36 NPPluginFuncs* plugin_functions) {
37 return NP_GetEntryPoints(plugin_functions);
38 }
39
40 // Called just before the plugin itself is completely unloaded from the
41 // browser. Should clean up anything allocated by NP_Initialize.
42 // Declaration: npupp.h
43 // Documentation URL: https://developer.mozilla.org/en/NP_Shutdown
44 NPError NP_Shutdown() {
45 return NPERR_NO_ERROR;
46 }
47 } // extern "C"
OLDNEW
« no previous file with comments | « tests/translation_service/hello_world.html ('k') | tests/translation_service/hello_world_nexe.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698