Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: remoting/host/plugin/host_script_object.cc

Issue 14522010: remoting: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/ipc_video_frame_capturer.cc ('k') | remoting/host/policy_hack/policy_watcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/host/ipc_video_frame_capturer.cc ('k') | remoting/host/policy_hack/policy_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698