| OLD | NEW |
| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 return; | 305 return; |
| 306 g_pnacl_resource_host.Get()->ReportTranslationFinished(instance); | 306 g_pnacl_resource_host.Get()->ReportTranslationFinished(instance); |
| 307 } | 307 } |
| 308 | 308 |
| 309 PP_Bool IsOffTheRecord() { | 309 PP_Bool IsOffTheRecord() { |
| 310 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); | 310 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); |
| 311 } | 311 } |
| 312 | 312 |
| 313 PP_Bool IsPnaclEnabled() { | 313 PP_Bool IsPnaclEnabled() { |
| 314 return PP_FromBool( | 314 return PP_FromBool( |
| 315 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePnacl)); | 315 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePnacl)); |
| 316 } | 316 } |
| 317 | 317 |
| 318 PP_NaClResult ReportNaClError(PP_Instance instance, | 318 PP_NaClResult ReportNaClError(PP_Instance instance, |
| 319 PP_NaClError error_id) { | 319 PP_NaClError error_id) { |
| 320 IPC::Sender* sender = content::RenderThread::Get(); | 320 IPC::Sender* sender = content::RenderThread::Get(); |
| 321 | 321 |
| 322 if (!sender->Send( | 322 if (!sender->Send( |
| 323 new NaClHostMsg_NaClErrorStatus( | 323 new NaClHostMsg_NaClErrorStatus( |
| 324 // TODO(dschuff): does this enum need to be sent as an int, | 324 // TODO(dschuff): does this enum need to be sent as an int, |
| 325 // or is it safe to include the appropriate headers in | 325 // or is it safe to include the appropriate headers in |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 &OpenNaClExecutable | 374 &OpenNaClExecutable |
| 375 }; | 375 }; |
| 376 | 376 |
| 377 } // namespace | 377 } // namespace |
| 378 | 378 |
| 379 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { | 379 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { |
| 380 return &nacl_interface; | 380 return &nacl_interface; |
| 381 } | 381 } |
| 382 | 382 |
| 383 #endif // DISABLE_NACL | 383 #endif // DISABLE_NACL |
| OLD | NEW |