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

Side by Side Diff: ppapi/cpp/module_embedder.h

Issue 10069035: Add a way to implement GetInterface in the broker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_CPP_MODULE_EMBEDDER_H_ 5 #ifndef PPAPI_CPP_MODULE_EMBEDDER_H_
6 #define PPAPI_CPP_MODULE_EMBEDDER_H_ 6 #define PPAPI_CPP_MODULE_EMBEDDER_H_
7 7
8 #include "ppapi/c/ppp.h"
9
8 /// @file 10 /// @file
9 /// This file defines the APIs for creating a Module object. 11 /// This file defines the APIs for creating a Module object.
10 namespace pp { 12 namespace pp {
11 13
12 class Module; 14 class Module;
13 15
14 /// This function creates the <code>pp::Module</code> object associated with 16 /// This function creates the <code>pp::Module</code> object associated with
15 /// this module. 17 /// this module.
16 /// 18 ///
17 /// <strong>Note: </strong>NaCl module developers must implement this function. 19 /// <strong>Note: </strong>NaCl module developers must implement this function.
18 /// 20 ///
19 /// @return Returns the module if it was successfully created, or NULL on 21 /// @return Returns the module if it was successfully created, or NULL on
20 /// failure. Upon failure, the module will be unloaded. 22 /// failure. Upon failure, the module will be unloaded.
21 pp::Module* CreateModule(); 23 pp::Module* CreateModule();
22 24
25 /// Sets the get interface function in the broker process.
26 ///
27 /// This function is only relevant when you're using the PPB_Broker interface
28 /// in a trusted native plugin. In this case, you may need to implement
29 /// PPP_GetInterface when the plugin is loaded in the unsandboxed process.
30 /// Normally the C++ wrappers implement PPP_GetInterface for you but this
31 /// doesn't work in the context of the broker process.
32 //
33 /// So if you need to implement PPP_* interfaces in the broker process, call
34 /// this function in your PPP_InitializeBroker implementation which will set
35 /// up the given function as implementing PPP_GetInterface.
36 void SetBrokerGetInterfaceFunc(PP_GetInterface_Func broker_get_interface);
37
23 } // namespace pp 38 } // namespace pp
24 39
25 #endif // PPAPI_CPP_MODULE_EMBEDDER_H_ 40 #endif // PPAPI_CPP_MODULE_EMBEDDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698