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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 return; | 287 return; |
288 g_pnacl_resource_host.Get()->ReportTranslationFinished(instance); | 288 g_pnacl_resource_host.Get()->ReportTranslationFinished(instance); |
289 } | 289 } |
290 | 290 |
291 PP_Bool IsOffTheRecord() { | 291 PP_Bool IsOffTheRecord() { |
292 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); | 292 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); |
293 } | 293 } |
294 | 294 |
295 PP_Bool IsPnaclEnabled() { | 295 PP_Bool IsPnaclEnabled() { |
296 return PP_FromBool( | 296 return PP_FromBool( |
297 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePnacl)); | 297 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePnacl)); |
298 } | 298 } |
299 | 299 |
300 PP_ExternalPluginResult ReportNaClError(PP_Instance instance, | 300 PP_ExternalPluginResult ReportNaClError(PP_Instance instance, |
301 PP_NaClError error_id) { | 301 PP_NaClError error_id) { |
302 IPC::Sender* sender = content::RenderThread::Get(); | 302 IPC::Sender* sender = content::RenderThread::Get(); |
303 | 303 |
304 if (!sender->Send( | 304 if (!sender->Send( |
305 new NaClHostMsg_NaClErrorStatus( | 305 new NaClHostMsg_NaClErrorStatus( |
306 // TODO(dschuff): does this enum need to be sent as an int, | 306 // TODO(dschuff): does this enum need to be sent as an int, |
307 // or is it safe to include the appropriate headers in | 307 // or is it safe to include the appropriate headers in |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 &OpenNaClExecutable | 356 &OpenNaClExecutable |
357 }; | 357 }; |
358 | 358 |
359 } // namespace | 359 } // namespace |
360 | 360 |
361 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { | 361 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { |
362 return &nacl_interface; | 362 return &nacl_interface; |
363 } | 363 } |
364 | 364 |
365 #endif // DISABLE_NACL | 365 #endif // DISABLE_NACL |
OLD | NEW |