| 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 #ifdef _MSC_VER | 5 #ifdef _MSC_VER |
| 6 // Do not warn about use of std::copy with raw pointers. | 6 // Do not warn about use of std::copy with raw pointers. |
| 7 #pragma warning(disable : 4996) | 7 #pragma warning(disable : 4996) |
| 8 #endif | 8 #endif |
| 9 | 9 |
| 10 #include "ppapi/native_client/src/trusted/plugin/plugin.h" | 10 #include "ppapi/native_client/src/trusted/plugin/plugin.h" |
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate); | 1208 callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate); |
| 1209 // Will always call the callback on success or failure. | 1209 // Will always call the callback on success or failure. |
| 1210 pnacl_coordinator_.reset( | 1210 pnacl_coordinator_.reset( |
| 1211 PnaclCoordinator::BitcodeToNative(this, | 1211 PnaclCoordinator::BitcodeToNative(this, |
| 1212 program_url, | 1212 program_url, |
| 1213 pnacl_options, | 1213 pnacl_options, |
| 1214 translate_callback)); | 1214 translate_callback)); |
| 1215 return; | 1215 return; |
| 1216 } else { | 1216 } else { |
| 1217 error_info.SetReport(ERROR_PNACL_NOT_ENABLED, | 1217 error_info.SetReport(ERROR_PNACL_NOT_ENABLED, |
| 1218 "PNaCl has not been enabled (e.g., by setting " | 1218 "PNaCl has been disabled (e.g., by setting " |
| 1219 "the --enable-pnacl flag)."); | 1219 "the --disable-pnacl flag)."); |
| 1220 } | 1220 } |
| 1221 } else { | 1221 } else { |
| 1222 // Try the fast path first. This will only block if the file is installed. | 1222 // Try the fast path first. This will only block if the file is installed. |
| 1223 if (OpenURLFast(program_url, &nexe_downloader_)) { | 1223 if (OpenURLFast(program_url, &nexe_downloader_)) { |
| 1224 NexeFileDidOpen(PP_OK); | 1224 NexeFileDidOpen(PP_OK); |
| 1225 } else { | 1225 } else { |
| 1226 pp::CompletionCallback open_callback = | 1226 pp::CompletionCallback open_callback = |
| 1227 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); | 1227 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); |
| 1228 // Will always call the callback on success or failure. | 1228 // Will always call the callback on success or failure. |
| 1229 CHECK( | 1229 CHECK( |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 static_cast<uint32_t>(text.size())); | 1682 static_cast<uint32_t>(text.size())); |
| 1683 const PPB_Console* console_interface = | 1683 const PPB_Console* console_interface = |
| 1684 static_cast<const PPB_Console*>( | 1684 static_cast<const PPB_Console*>( |
| 1685 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); | 1685 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); |
| 1686 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); | 1686 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); |
| 1687 var_interface->Release(prefix); | 1687 var_interface->Release(prefix); |
| 1688 var_interface->Release(str); | 1688 var_interface->Release(str); |
| 1689 } | 1689 } |
| 1690 | 1690 |
| 1691 } // namespace plugin | 1691 } // namespace plugin |
| OLD | NEW |