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

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

Issue 8301006: Packaged (CRX) extensions shouldn't be able to get 'dev' interfaces in NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_GLOBALS_H_ 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_GLOBALS_H_
6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_GLOBALS_H_ 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_GLOBALS_H_
7 7
8 #include "ppapi/c/dev/ppb_cursor_control_dev.h" 8 #include "ppapi/c/dev/ppb_cursor_control_dev.h"
9 #include "ppapi/c/dev/ppb_find_dev.h" 9 #include "ppapi/c/dev/ppb_find_dev.h"
10 #include "ppapi/c/dev/ppb_font_dev.h" 10 #include "ppapi/c/dev/ppb_font_dev.h"
(...skipping 25 matching lines...) Expand all
36 #include "ppapi/c/private/ppb_pdf.h" 36 #include "ppapi/c/private/ppb_pdf.h"
37 #include "ppapi/c/trusted/ppb_graphics_3d_trusted.h" 37 #include "ppapi/c/trusted/ppb_graphics_3d_trusted.h"
38 #include "ppapi/c/trusted/ppb_image_data_trusted.h" 38 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
39 39
40 struct NaClSrpcRpc; 40 struct NaClSrpcRpc;
41 struct NaClSrpcChannel; 41 struct NaClSrpcChannel;
42 42
43 namespace ppapi_proxy { 43 namespace ppapi_proxy {
44 44
45 // These functions handle the browser-side (trusted code) mapping of a browser 45 // These functions handle the browser-side (trusted code) mapping of a browser
46 // Instance to instance-specific data, such as the SRPC communication channel. 46 // instance to instance-specific data, such as the SRPC communication channel.
47 // These functions are called by the in-browser (trusted) plugin code, and are 47 // These functions are called by the in-browser (trusted) plugin code, and are
48 // always called from the main (foreground, UI, ...) thread. As such, they are 48 // always called from the main (foreground, UI, ...) thread. As such, they are
49 // not thread-safe (they do not need to be). 49 // not thread-safe (they do not need to be).
50 50
51 // BrowserPpp keeps browser side PPP_Instance specific information, such as the 51 // BrowserPpp keeps browser side PPP_Instance specific information, such as the
52 // channel used to talk to the instance. 52 // channel used to talk to the instance.
53 class BrowserPpp; 53 class BrowserPpp;
54 54
55 // Returns true if the PPAPI Developer interfaces are enabled.
56 // To enable, set the environment variable NACL_ENABLE_PPAPI_DEV=1
57 // Note: Developer interfaces are _not_ enabled by default.
58 bool AreDevInterfacesEnabled();
59
60 // Associate a particular BrowserPpp with a PP_Instance value. This allows the 55 // Associate a particular BrowserPpp with a PP_Instance value. This allows the
61 // browser side to look up information it needs to communicate with the stub. 56 // browser side to look up information it needs to communicate with the stub.
62 void SetBrowserPppForInstance(PP_Instance instance, 57 void SetBrowserPppForInstance(PP_Instance instance,
63 BrowserPpp* browser_ppp); 58 BrowserPpp* browser_ppp);
64 // When an instance is destroyed, this is called to remove the association, as 59 // When an instance is destroyed, this is called to remove the association, as
65 // the stub will be destroyed by a call to Shutdown. 60 // the stub will be destroyed by a call to Shutdown.
66 void UnsetBrowserPppForInstance(PP_Instance instance); 61 void UnsetBrowserPppForInstance(PP_Instance instance);
67 // Gets the BrowserPpp information remembered for a particular instance. 62 // Gets the BrowserPpp information remembered for a particular instance.
68 BrowserPpp* LookupBrowserPppForInstance(PP_Instance instance); 63 BrowserPpp* LookupBrowserPppForInstance(PP_Instance instance);
69 64
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 const PPB_WheelInputEvent* PPBWheelInputEventInterface(); 123 const PPB_WheelInputEvent* PPBWheelInputEventInterface();
129 const PPB_Widget_Dev* PPBWidgetInterface(); 124 const PPB_Widget_Dev* PPBWidgetInterface();
130 const PPB_Zoom_Dev* PPBZoomInterface(); 125 const PPB_Zoom_Dev* PPBZoomInterface();
131 126
132 // PPAPI constants used in the proxy. 127 // PPAPI constants used in the proxy.
133 extern const PP_Resource kInvalidResourceId; 128 extern const PP_Resource kInvalidResourceId;
134 129
135 } // namespace ppapi_proxy 130 } // namespace ppapi_proxy
136 131
137 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_GLOBALS_H_ 132 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_BROWSER_GLOBALS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698