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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 GetRoutingID(instance), | 283 GetRoutingID(instance), |
284 instance, | 284 instance, |
285 cache_info, | 285 cache_info, |
286 is_hit, | 286 is_hit, |
287 handle, | 287 handle, |
288 enter.callback()); | 288 enter.callback()); |
289 | 289 |
290 return enter.SetResult(PP_OK_COMPLETIONPENDING); | 290 return enter.SetResult(PP_OK_COMPLETIONPENDING); |
291 } | 291 } |
292 | 292 |
293 void ReportTranslationFinished(PP_Instance instance) { | 293 void ReportTranslationFinished(PP_Instance instance, PP_Bool success) { |
294 // If the resource host isn't initialized, don't try to do that here. | 294 // If the resource host isn't initialized, don't try to do that here. |
295 // Just return because something is already very wrong. | 295 // Just return because something is already very wrong. |
296 if (g_pnacl_resource_host.Get() == NULL) | 296 if (g_pnacl_resource_host.Get() == NULL) |
297 return; | 297 return; |
298 g_pnacl_resource_host.Get()->ReportTranslationFinished(instance); | 298 g_pnacl_resource_host.Get()->ReportTranslationFinished(instance, success); |
299 } | 299 } |
300 | 300 |
301 PP_Bool IsOffTheRecord() { | 301 PP_Bool IsOffTheRecord() { |
302 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); | 302 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); |
303 } | 303 } |
304 | 304 |
305 PP_Bool IsPnaclEnabled() { | 305 PP_Bool IsPnaclEnabled() { |
306 return PP_FromBool( | 306 return PP_FromBool( |
307 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePnacl)); | 307 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePnacl)); |
308 } | 308 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 &OpenNaClExecutable | 367 &OpenNaClExecutable |
368 }; | 368 }; |
369 | 369 |
370 } // namespace | 370 } // namespace |
371 | 371 |
372 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { | 372 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { |
373 return &nacl_interface; | 373 return &nacl_interface; |
374 } | 374 } |
375 | 375 |
376 #endif // DISABLE_NACL | 376 #endif // DISABLE_NACL |
OLD | NEW |