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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 // Will always call the callback on success or failure. | 1223 // Will always call the callback on success or failure. |
1224 pnacl_coordinator_.reset( | 1224 pnacl_coordinator_.reset( |
1225 PnaclCoordinator::BitcodeToNative(this, | 1225 PnaclCoordinator::BitcodeToNative(this, |
1226 program_url, | 1226 program_url, |
1227 pnacl_options, | 1227 pnacl_options, |
1228 translate_callback)); | 1228 translate_callback)); |
1229 return; | 1229 return; |
1230 } | 1230 } |
1231 } else { | 1231 } else { |
1232 error_info.SetReport(ERROR_PNACL_NOT_ENABLED, | 1232 error_info.SetReport(ERROR_PNACL_NOT_ENABLED, |
1233 "PNaCl has been disabled (e.g., by setting " | 1233 "PNaCl has not been enabled (e.g., by setting " |
1234 "the --disable-pnacl flag)."); | 1234 "the --enable-pnacl flag)."); |
1235 } | 1235 } |
1236 } else { | 1236 } else { |
1237 // Try the fast path first. This will only block if the file is installed. | 1237 // Try the fast path first. This will only block if the file is installed. |
1238 if (OpenURLFast(program_url, &nexe_downloader_)) { | 1238 if (OpenURLFast(program_url, &nexe_downloader_)) { |
1239 NexeFileDidOpen(PP_OK); | 1239 NexeFileDidOpen(PP_OK); |
1240 } else { | 1240 } else { |
1241 pp::CompletionCallback open_callback = | 1241 pp::CompletionCallback open_callback = |
1242 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); | 1242 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); |
1243 // Will always call the callback on success or failure. | 1243 // Will always call the callback on success or failure. |
1244 CHECK( | 1244 CHECK( |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 static_cast<uint32_t>(text.size())); | 1697 static_cast<uint32_t>(text.size())); |
1698 const PPB_Console* console_interface = | 1698 const PPB_Console* console_interface = |
1699 static_cast<const PPB_Console*>( | 1699 static_cast<const PPB_Console*>( |
1700 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); | 1700 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); |
1701 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); | 1701 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); |
1702 var_interface->Release(prefix); | 1702 var_interface->Release(prefix); |
1703 var_interface->Release(str); | 1703 var_interface->Release(str); |
1704 } | 1704 } |
1705 | 1705 |
1706 } // namespace plugin | 1706 } // namespace plugin |
OLD | NEW |