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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc

Issue 9253011: Pepper SRPC proxy style and type nits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad license to pass presubmit check Created 8 years, 11 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "native_client/src/shared/ppapi_proxy/browser_ppp.h" 5 #include "native_client/src/shared/ppapi_proxy/browser_ppp.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "native_client/src/include/nacl_scoped_ptr.h" 9 #include "native_client/src/include/nacl_scoped_ptr.h"
10 #include "native_client/src/include/portability.h" 10 #include "native_client/src/include/portability.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // their pointers are available on upcall thread of the the trusted proxy. 51 // their pointers are available on upcall thread of the the trusted proxy.
52 void PPBGetInterfaces() { 52 void PPBGetInterfaces() {
53 PPBCoreInterface(); 53 PPBCoreInterface();
54 // TODO(all): add more interfaces here once available off the main thread. 54 // TODO(all): add more interfaces here once available off the main thread.
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 58
59 int32_t BrowserPpp::InitializeModule(PP_Module module_id, 59 int32_t BrowserPpp::InitializeModule(PP_Module module_id,
60 PPB_GetInterface get_browser_interface) { 60 PPB_GetInterface get_browser_interface) {
61 DebugPrintf("PPP_InitializeModule: module=%"NACL_PRIu32"\n", module_id); 61 DebugPrintf("PPP_InitializeModule: module=%"NACL_PRId32"\n", module_id);
62 // Ask the browser for an interface which provides missing functions 62 // Ask the browser for an interface which provides missing functions
63 const PPB_NaCl_Private* ppb_nacl = reinterpret_cast<const PPB_NaCl_Private*>( 63 const PPB_NaCl_Private* ppb_nacl = reinterpret_cast<const PPB_NaCl_Private*>(
64 get_browser_interface(PPB_NACL_PRIVATE_INTERFACE)); 64 get_browser_interface(PPB_NACL_PRIVATE_INTERFACE));
65 if (ppb_nacl == NULL) { 65 if (ppb_nacl == NULL) {
66 DebugPrintf("PPP_InitializeModule: NaCl private interface missing!\n"); 66 DebugPrintf("PPP_InitializeModule: NaCl private interface missing!\n");
67 return PP_ERROR_FAILED; 67 return PP_ERROR_FAILED;
68 } 68 }
69 SetPPBGetInterface(get_browser_interface, 69 SetPPBGetInterface(get_browser_interface,
70 plugin_->enable_dev_interfaces(), 70 plugin_->enable_dev_interfaces(),
71 !ppb_nacl->Are3DInterfacesDisabled()); 71 !ppb_nacl->Are3DInterfacesDisabled());
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 const void* BrowserPpp::GetPluginInterfaceSafe(const char* interface_name) { 215 const void* BrowserPpp::GetPluginInterfaceSafe(const char* interface_name) {
216 const void* ppp_interface = GetPluginInterface(interface_name); 216 const void* ppp_interface = GetPluginInterface(interface_name);
217 if (ppp_interface == NULL) 217 if (ppp_interface == NULL)
218 DebugPrintf("PPB_GetInterface: %s not found\n", interface_name); 218 DebugPrintf("PPB_GetInterface: %s not found\n", interface_name);
219 CHECK(ppp_interface != NULL); 219 CHECK(ppp_interface != NULL);
220 return ppp_interface; 220 return ppp_interface;
221 } 221 }
222 222
223 } // namespace ppapi_proxy 223 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698