| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #define NACL_LOG_MODULE_NAME "Plugin_ServiceRuntime" | 7 #define NACL_LOG_MODULE_NAME "Plugin_ServiceRuntime" |
| 8 | 8 |
| 9 #include "ppapi/native_client/src/trusted/plugin/service_runtime.h" | 9 #include "ppapi/native_client/src/trusted/plugin/service_runtime.h" |
| 10 | 10 |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 // Callback is now delegated from p to open_cont. So, here we manually clear | 399 // Callback is now delegated from p to open_cont. So, here we manually clear |
| 400 // complete callback. | 400 // complete callback. |
| 401 p->callback = NULL; | 401 p->callback = NULL; |
| 402 | 402 |
| 403 pp::CompletionCallback stream_cc = WeakRefNewCallback( | 403 pp::CompletionCallback stream_cc = WeakRefNewCallback( |
| 404 anchor_, | 404 anchor_, |
| 405 this, | 405 this, |
| 406 &PluginReverseInterface::StreamAsFile_MainThreadContinuation, | 406 &PluginReverseInterface::StreamAsFile_MainThreadContinuation, |
| 407 open_cont); | 407 open_cont); |
| 408 | 408 |
| 409 plugin_->StreamAsFile(mapped_url, &open_cont->pp_file_info, stream_cc); | 409 GetNaClInterface()->DownloadFile(plugin_->pp_instance(), |
| 410 mapped_url.c_str(), |
| 411 &open_cont->pp_file_info, |
| 412 stream_cc.pp_completion_callback()); |
| 410 // p is deleted automatically. | 413 // p is deleted automatically. |
| 411 } | 414 } |
| 412 | 415 |
| 413 void PluginReverseInterface::StreamAsFile_MainThreadContinuation( | 416 void PluginReverseInterface::StreamAsFile_MainThreadContinuation( |
| 414 OpenManifestEntryResource* p, | 417 OpenManifestEntryResource* p, |
| 415 int32_t result) { | 418 int32_t result) { |
| 416 NaClLog(4, "Entered StreamAsFile_MainThreadContinuation\n"); | 419 NaClLog(4, "Entered StreamAsFile_MainThreadContinuation\n"); |
| 417 { | 420 { |
| 418 nacl::MutexLocker take(&mu_); | 421 nacl::MutexLocker take(&mu_); |
| 419 if (result == PP_OK) { | 422 if (result == PP_OK) { |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 797 |
| 795 nacl::string ServiceRuntime::GetCrashLogOutput() { | 798 nacl::string ServiceRuntime::GetCrashLogOutput() { |
| 796 if (NULL != subprocess_.get()) { | 799 if (NULL != subprocess_.get()) { |
| 797 return subprocess_->GetCrashLogOutput(); | 800 return subprocess_->GetCrashLogOutput(); |
| 798 } else { | 801 } else { |
| 799 return std::string(); | 802 return std::string(); |
| 800 } | 803 } |
| 801 } | 804 } |
| 802 | 805 |
| 803 } // namespace plugin | 806 } // namespace plugin |
| OLD | NEW |