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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_globals.h

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
(Empty)
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_
6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_
7
8 #include "ppapi/c/dev/ppb_memory_dev.h"
9 #include "ppapi/c/dev/ppp_find_dev.h"
10 #include "ppapi/c/dev/ppp_printing_dev.h"
11 #include "ppapi/c/dev/ppp_scrollbar_dev.h"
12 #include "ppapi/c/dev/ppp_selection_dev.h"
13 #include "ppapi/c/dev/ppp_widget_dev.h"
14 #include "ppapi/c/dev/ppp_zoom_dev.h"
15 #include "ppapi/c/pp_module.h"
16 #include "ppapi/c/ppb.h"
17 #include "ppapi/c/ppb_core.h"
18 #include "ppapi/c/ppb_var.h"
19 #include "ppapi/c/ppp_input_event.h"
20 #include "ppapi/c/ppp_instance.h"
21 #include "ppapi/c/ppp_messaging.h"
22 #include "native_client/src/untrusted/irt/irt_ppapi.h"
23
24 struct NaClSrpcChannel;
25
26 namespace ppapi_proxy {
27
28 // The main SRPC channel is that used to handle foreground (main thread)
29 // RPC traffic.
30 NaClSrpcChannel* GetMainSrpcChannel();
31 void SetMainSrpcChannel(NaClSrpcChannel* channel);
32
33 // The upcall SRPC channel is that used to handle other threads' RPC traffic.
34 NaClSrpcChannel* GetUpcallSrpcChannel();
35 void SetUpcallSrpcChannel(NaClSrpcChannel* channel);
36
37 // Save the plugin's module_id, which is used for storage allocation tracking.
38 void SetModuleIdForSrpcChannel(NaClSrpcChannel* channel, PP_Module module_id);
39 // Forget the plugin's module_id.
40 void UnsetModuleIdForSrpcChannel(NaClSrpcChannel* channel);
41 // Save the plugin's module_id.
42 PP_Module LookupModuleIdForSrpcChannel(NaClSrpcChannel* channel);
43
44 // Support for getting PPB_ browser interfaces.
45 // Safe version CHECK's for NULL.
46 const void* GetBrowserInterface(const char* interface_name);
47 const void* GetBrowserInterfaceSafe(const char* interface_name);
48 // Functions marked "shared" are to be provided by both the browser and the
49 // plugin side of the proxy, so they can be used by the shared proxy code
50 // under both trusted and untrusted compilation.
51 const PPB_Core* PPBCoreInterface(); // shared
52 const PPB_Memory_Dev* PPBMemoryInterface(); // shared
53 const PPB_Var* PPBVarInterface(); // shared
54
55 // Support for getting PPP_ plugin interfaces.
56 // Safe version CHECK's for NULL.
57 // Since no PppRpcServer function will be called if the interface is NULL,
58 // safe version is used to define interface getters below.
59 const void* GetPluginInterface(const char* interface_name);
60 const void* GetPluginInterfaceSafe(const char* interface_name);
61 const PPP_Find_Dev* PPPFindInterface();
62 const PPP_InputEvent* PPPInputEventInterface();
63 const PPP_Instance* PPPInstanceInterface();
64 const PPP_Messaging* PPPMessagingInterface();
65 const PPP_Printing_Dev* PPPPrintingInterface();
66 const PPP_Scrollbar_Dev* PPPScrollbarInterface();
67 const PPP_Selection_Dev* PPPSelectionInterface();
68 const PPP_Widget_Dev* PPPWidgetInterface();
69 const PPP_Zoom_Dev* PPPZoomInterface();
70
71 // Get thread creation/join functions.
72 const struct PP_ThreadFunctions* GetThreadCreator();
73
74 // PPAPI constants used in the proxy.
75 extern const PP_Resource kInvalidResourceId;
76
77 } // namespace ppapi_proxy
78
79 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698