OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/nacl/renderer/nexe_load_manager.h" | 5 #include "components/nacl/renderer/nexe_load_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 void NexeLoadManager::set_trusted_plugin_channel( | 288 void NexeLoadManager::set_trusted_plugin_channel( |
289 std::unique_ptr<TrustedPluginChannel> channel) { | 289 std::unique_ptr<TrustedPluginChannel> channel) { |
290 trusted_plugin_channel_ = std::move(channel); | 290 trusted_plugin_channel_ = std::move(channel); |
291 } | 291 } |
292 | 292 |
293 void NexeLoadManager::set_manifest_service_channel( | 293 void NexeLoadManager::set_manifest_service_channel( |
294 std::unique_ptr<ManifestServiceChannel> channel) { | 294 std::unique_ptr<ManifestServiceChannel> channel) { |
295 manifest_service_channel_ = std::move(channel); | 295 manifest_service_channel_ = std::move(channel); |
296 } | 296 } |
297 | 297 |
| 298 void NexeLoadManager::close_trusted_plugin_channel() { |
| 299 trusted_plugin_channel_.reset(); |
| 300 } |
| 301 |
298 PP_NaClReadyState NexeLoadManager::nacl_ready_state() { | 302 PP_NaClReadyState NexeLoadManager::nacl_ready_state() { |
299 return nacl_ready_state_; | 303 return nacl_ready_state_; |
300 } | 304 } |
301 | 305 |
302 void NexeLoadManager::set_nacl_ready_state(PP_NaClReadyState ready_state) { | 306 void NexeLoadManager::set_nacl_ready_state(PP_NaClReadyState ready_state) { |
303 nacl_ready_state_ = ready_state; | 307 nacl_ready_state_ = ready_state; |
304 ppapi::ScopedPPVar ready_state_name( | 308 ppapi::ScopedPPVar ready_state_name( |
305 ppapi::ScopedPPVar::PassRef(), | 309 ppapi::ScopedPPVar::PassRef(), |
306 ppapi::StringVar::StringToPPVar("readyState")); | 310 ppapi::StringVar::StringToPPVar("readyState")); |
307 SetReadOnlyProperty(ready_state_name.get(), PP_MakeInt32(ready_state)); | 311 SetReadOnlyProperty(ready_state_name.get(), PP_MakeInt32(ready_state)); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 // to provide error handling. | 444 // to provide error handling. |
441 } | 445 } |
442 | 446 |
443 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { | 447 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { |
444 base::StringTokenizer t(crash_log, "\n"); | 448 base::StringTokenizer t(crash_log, "\n"); |
445 while (t.GetNext()) | 449 while (t.GetNext()) |
446 LogToConsole(t.token()); | 450 LogToConsole(t.token()); |
447 } | 451 } |
448 | 452 |
449 } // namespace nacl | 453 } // namespace nacl |
OLD | NEW |