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

Unified Diff: remoting/host/plugin/host_script_object.cc

Issue 10384127: Chromoting: the Me2me host now presents a notification on the console allowing a user to disconnect… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Unix-line endings. The license text. Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/plugin/host_plugin_resource.h ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/plugin/host_script_object.cc
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index 83f201f7a74ad4d7d01fe3001af836c25b7c2481..fd3fa55f78b13aa368578135735906ade5a3db5f 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -98,9 +98,7 @@ HostNPScriptObject::~HostNPScriptObject() {
// Shutdown It2MeHostUserInterface first so that it doesn't try to post
// tasks on the UI thread while we are stopping the host.
- if (it2me_host_user_interface_.get()) {
- it2me_host_user_interface_->Shutdown();
- }
+ it2me_host_user_interface_.reset();
HostLogHandler::UnregisterLoggingScriptObject(this);
@@ -561,9 +559,12 @@ void HostNPScriptObject::FinishConnectNetworkThread(
host_->AddStatusObserver(this);
log_to_server_.reset(
new LogToServer(host_, ServerLogEntry::IT2ME, signal_strategy_.get()));
+ base::Closure disconnect_callback = base::Bind(
+ &ChromotingHost::Shutdown, base::Unretained(host_.get()),
+ base::Closure());
it2me_host_user_interface_.reset(
- new It2MeHostUserInterface(host_.get(), host_context_.get()));
- it2me_host_user_interface_->Init();
+ new It2MeHostUserInterface(host_context_.get()));
+ it2me_host_user_interface_->Start(host_.get(), disconnect_callback);
{
base::AutoLock auto_lock(ui_strings_lock_);
« no previous file with comments | « remoting/host/plugin/host_plugin_resource.h ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698