| 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 #include "remoting/host/plugin/host_script_object.h" | 5 #include "remoting/host/plugin/host_script_object.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 HostNPScriptObject::HostNPScriptObject( | 648 HostNPScriptObject::HostNPScriptObject( |
| 649 NPP plugin, | 649 NPP plugin, |
| 650 NPObject* parent, | 650 NPObject* parent, |
| 651 scoped_refptr<AutoThreadTaskRunner> plugin_task_runner) | 651 scoped_refptr<AutoThreadTaskRunner> plugin_task_runner) |
| 652 : plugin_(plugin), | 652 : plugin_(plugin), |
| 653 parent_(parent), | 653 parent_(parent), |
| 654 plugin_task_runner_(plugin_task_runner), | 654 plugin_task_runner_(plugin_task_runner), |
| 655 am_currently_logging_(false), | 655 am_currently_logging_(false), |
| 656 state_(kDisconnected), | 656 state_(kDisconnected), |
| 657 daemon_controller_(DaemonController::Create()), | 657 daemon_controller_(DaemonController::Create()), |
| 658 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), | 658 weak_factory_(this), |
| 659 weak_ptr_(weak_factory_.GetWeakPtr()) { | 659 weak_ptr_(weak_factory_.GetWeakPtr()) { |
| 660 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); | 660 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); |
| 661 | 661 |
| 662 // Set the thread task runner for the plugin thread so that timers and other | 662 // Set the thread task runner for the plugin thread so that timers and other |
| 663 // code using |base::ThreadTaskRunnerHandle| could be used on the plugin | 663 // code using |base::ThreadTaskRunnerHandle| could be used on the plugin |
| 664 // thread. | 664 // thread. |
| 665 // | 665 // |
| 666 // If component build is used, Chrome and the plugin may end up sharing base | 666 // If component build is used, Chrome and the plugin may end up sharing base |
| 667 // binary. This means that the instance of |base::ThreadTaskRunnerHandle| | 667 // binary. This means that the instance of |base::ThreadTaskRunnerHandle| |
| 668 // created by Chrome for the current thread is shared as well. This routinely | 668 // created by Chrome for the current thread is shared as well. This routinely |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 } | 1582 } |
| 1583 | 1583 |
| 1584 void HostNPScriptObject::SetException(const std::string& exception_string) { | 1584 void HostNPScriptObject::SetException(const std::string& exception_string) { |
| 1585 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); | 1585 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); |
| 1586 | 1586 |
| 1587 g_npnetscape_funcs->setexception(parent_, exception_string.c_str()); | 1587 g_npnetscape_funcs->setexception(parent_, exception_string.c_str()); |
| 1588 LOG(INFO) << exception_string; | 1588 LOG(INFO) << exception_string; |
| 1589 } | 1589 } |
| 1590 | 1590 |
| 1591 } // namespace remoting | 1591 } // namespace remoting |
| OLD | NEW |