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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 | 1127 |
1128 bool Plugin::SetManifestObject(const nacl::string& manifest_json, | 1128 bool Plugin::SetManifestObject(const nacl::string& manifest_json, |
1129 ErrorInfo* error_info) { | 1129 ErrorInfo* error_info) { |
1130 PLUGIN_PRINTF(("Plugin::SetManifestObject(): manifest_json='%s'.\n", | 1130 PLUGIN_PRINTF(("Plugin::SetManifestObject(): manifest_json='%s'.\n", |
1131 manifest_json.c_str())); | 1131 manifest_json.c_str())); |
1132 if (error_info == NULL) | 1132 if (error_info == NULL) |
1133 return false; | 1133 return false; |
1134 // Determine whether lookups should use portable (i.e., pnacl versions) | 1134 // Determine whether lookups should use portable (i.e., pnacl versions) |
1135 // rather than platform-specific files. | 1135 // rather than platform-specific files. |
1136 bool is_pnacl = (mime_type() == kPnaclMIMEType); | 1136 bool is_pnacl = (mime_type() == kPnaclMIMEType); |
| 1137 bool pnacl_debug = GetNaClInterface()->NaClDebugStubEnabled(); |
1137 nacl::scoped_ptr<JsonManifest> json_manifest( | 1138 nacl::scoped_ptr<JsonManifest> json_manifest( |
1138 new JsonManifest(url_util_, | 1139 new JsonManifest(url_util_, |
1139 manifest_base_url(), | 1140 manifest_base_url(), |
1140 (is_pnacl ? kPortableISA : GetSandboxISA()))); | 1141 (is_pnacl ? kPortableISA : GetSandboxISA()), |
| 1142 pnacl_debug)); |
1141 if (!json_manifest->Init(manifest_json, error_info)) { | 1143 if (!json_manifest->Init(manifest_json, error_info)) { |
1142 return false; | 1144 return false; |
1143 } | 1145 } |
1144 manifest_.reset(json_manifest.release()); | 1146 manifest_.reset(json_manifest.release()); |
1145 return true; | 1147 return true; |
1146 } | 1148 } |
1147 | 1149 |
1148 void Plugin::UrlDidOpenForStreamAsFile(int32_t pp_error, | 1150 void Plugin::UrlDidOpenForStreamAsFile(int32_t pp_error, |
1149 FileDownloader*& url_downloader, | 1151 FileDownloader*& url_downloader, |
1150 PP_CompletionCallback callback) { | 1152 PP_CompletionCallback callback) { |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 DCHECK(pp::Module::Get()->core()->IsMainThread()); | 1476 DCHECK(pp::Module::Get()->core()->IsMainThread()); |
1475 DCHECK(nacl_interface_); | 1477 DCHECK(nacl_interface_); |
1476 exit_status_ = exit_status; | 1478 exit_status_ = exit_status; |
1477 nacl_interface_->SetReadOnlyProperty(pp_instance(), | 1479 nacl_interface_->SetReadOnlyProperty(pp_instance(), |
1478 pp::Var("exitStatus").pp_var(), | 1480 pp::Var("exitStatus").pp_var(), |
1479 pp::Var(exit_status_).pp_var()); | 1481 pp::Var(exit_status_).pp_var()); |
1480 } | 1482 } |
1481 | 1483 |
1482 | 1484 |
1483 } // namespace plugin | 1485 } // namespace plugin |
OLD | NEW |