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

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

Issue 8725016: Refactor IT2Me-specific functions into a HostObserver subclass. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation nits. Created 9 years, 1 month 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_script_object.h ('k') | remoting/host/simple_host_process.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 f826b8b8d48ad7bea2afd3020f014f2e4dd468a9..aecca5df205cdf7174fdb0a4ed58349869e4dce0 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -18,6 +18,7 @@
#include "remoting/host/host_key_pair.h"
#include "remoting/host/host_secret.h"
#include "remoting/host/in_memory_host_config.h"
+#include "remoting/host/it2me_host_user_interface.h"
#include "remoting/host/plugin/host_log_handler.h"
#include "remoting/host/plugin/policy_hack/nat_policy.h"
#include "remoting/host/register_support_host_request.h"
@@ -99,10 +100,10 @@ HostNPScriptObject::HostNPScriptObject(
HostNPScriptObject::~HostNPScriptObject() {
CHECK_EQ(base::PlatformThread::CurrentId(), np_thread_id_);
- // Shutdown DesktopEnvironment first so that it doesn't try to post
+ // Shutdown It2MeHostUserInterface first so that it doesn't try to post
// tasks on the UI thread while we are stopping the host.
- if (desktop_environment_.get()) {
- desktop_environment_->Shutdown();
+ if (it2me_host_user_interface_.get()) {
+ it2me_host_user_interface_->Shutdown();
}
HostLogHandler::UnregisterLoggingScriptObject(this);
@@ -520,6 +521,10 @@ void HostNPScriptObject::FinishConnect(
host_->AddStatusObserver(log_to_server_.get());
}
host_->set_it2me(true);
+ it2me_host_user_interface_.reset(new It2MeHostUserInterface(host_.get(),
+ &host_context_));
+ it2me_host_user_interface_->Init();
+ host_->AddStatusObserver(it2me_host_user_interface_.get());
{
base::AutoLock auto_lock(ui_strings_lock_);
« no previous file with comments | « remoting/host/plugin/host_script_object.h ('k') | remoting/host/simple_host_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698