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

Side by Side Diff: chrome/renderer/pepper/ppb_nacl_private_impl.cc

Issue 10689012: Add ability to load pnacl resources from DIR_PNACL_COMPONENT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PP_FileHandle Created 8 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
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 "chrome/renderer/pepper/ppb_nacl_private_impl.h" 5 #include "chrome/renderer/pepper/ppb_nacl_private_impl.h"
6 6
7 #ifndef DISABLE_NACL 7 #ifndef DISABLE_NACL
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 base::PlatformFile handle = IPC::PlatformFileForTransitToPlatformFile( 307 base::PlatformFile handle = IPC::PlatformFileForTransitToPlatformFile(
308 transit_fd); 308 transit_fd);
309 return handle; 309 return handle;
310 } 310 }
311 311
312 PP_Bool IsOffTheRecord() { 312 PP_Bool IsOffTheRecord() {
313 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); 313 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process());
314 } 314 }
315 315
316 PP_Bool IsPnaclEnabled() {
317 return PP_FromBool(CommandLine::ForCurrentProcess()->HasSwitch(
318 switches::kEnablePnacl));
319 }
320
316 const PPB_NaCl_Private nacl_interface = { 321 const PPB_NaCl_Private nacl_interface = {
317 &LaunchSelLdr, 322 &LaunchSelLdr,
318 &StartPpapiProxy, 323 &StartPpapiProxy,
319 &UrandomFD, 324 &UrandomFD,
320 &Are3DInterfacesDisabled, 325 &Are3DInterfacesDisabled,
321 &EnableBackgroundSelLdrLaunch, 326 &EnableBackgroundSelLdrLaunch,
322 &BrokerDuplicateHandle, 327 &BrokerDuplicateHandle,
323 &GetReadonlyPnaclFD, 328 &GetReadonlyPnaclFD,
324 &CreateTemporaryFile, 329 &CreateTemporaryFile,
325 &IsOffTheRecord 330 &IsOffTheRecord,
331 &IsPnaclEnabled
326 }; 332 };
327 333
328 } // namespace 334 } // namespace
329 335
330 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { 336 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() {
331 return &nacl_interface; 337 return &nacl_interface;
332 } 338 }
333 339
334 #endif // DISABLE_NACL 340 #endif // DISABLE_NACL
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698