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

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

Issue 13461029: The continue window is owned by the desktop environment now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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 d66d361da8e550a1ffac36237e5281a8228e03e4..346d7f45d0d0a18f658a4498d615045a1aec2321 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -19,14 +19,13 @@
#include "remoting/base/auth_token_util.h"
#include "remoting/base/auto_thread.h"
#include "remoting/base/rsa_key_pair.h"
-#include "remoting/host/basic_desktop_environment.h"
#include "remoting/host/chromoting_host.h"
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/host_config.h"
#include "remoting/host/host_event_logger.h"
#include "remoting/host/host_secret.h"
#include "remoting/host/host_status_observer.h"
-#include "remoting/host/it2me_host_user_interface.h"
+#include "remoting/host/it2me_desktop_environment.h"
#include "remoting/host/network_settings.h"
#include "remoting/host/pin_hash.h"
#include "remoting/host/plugin/host_log_handler.h"
@@ -167,7 +166,6 @@ class HostNPScriptObject::It2MeImpl
scoped_ptr<RegisterSupportHostRequest> register_request_;
scoped_ptr<LogToServer> log_to_server_;
scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_;
- scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_;
scoped_ptr<HostEventLogger> host_event_logger_;
scoped_refptr<ChromotingHost> host_;
@@ -227,7 +225,7 @@ void HostNPScriptObject::It2MeImpl::Connect(
return;
}
- desktop_environment_factory_.reset(new BasicDesktopEnvironmentFactory(
+ desktop_environment_factory_.reset(new It2MeDesktopEnvironmentFactory(
host_context_->network_task_runner(),
host_context_->input_task_runner(),
host_context_->ui_task_runner(),
@@ -239,12 +237,6 @@ void HostNPScriptObject::It2MeImpl::Connect(
policy_watcher_->StartWatching(
base::Bind(&It2MeImpl::OnPolicyUpdate, this));
- // The UserInterface object needs to be created on the UI thread.
- it2me_host_user_interface_.reset(
- new It2MeHostUserInterface(host_context_->network_task_runner(),
- host_context_->ui_task_runner(), ui_strings));
- it2me_host_user_interface_->Init();
-
// Switch to the network thread to start the actual connection.
host_context_->network_task_runner()->PostTask(
FROM_HERE, base::Bind(
@@ -400,10 +392,6 @@ void HostNPScriptObject::It2MeImpl::FinishConnect(
protocol::CandidateSessionConfig::DisableAudioChannel(protocol_config.get());
host_->set_protocol_config(protocol_config.Pass());
- // Create user interface.
- it2me_host_user_interface_->Start(host_.get(),
- base::Bind(&It2MeImpl::Disconnect, this));
-
// Create event logger.
host_event_logger_ =
HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName);
@@ -425,13 +413,6 @@ void HostNPScriptObject::It2MeImpl::OnShutdownFinished() {
// Note that OnShutdownFinished() may be called more than once.
- // UI needs to be shut down on the UI thread before we destroy the
- // host context (because it depends on the context object), but
- // only after the host has been shut down (becase the UI object is
- // registered as status observer for the host, and we can't
- // unregister it from this thread).
- it2me_host_user_interface_.reset();
-
// Destroy the DesktopEnvironmentFactory, to free thread references.
desktop_environment_factory_.reset();
@@ -571,7 +552,6 @@ void HostNPScriptObject::It2MeImpl::UpdateHostDomainPolicy(
HostNPScriptObject::It2MeImpl::~It2MeImpl() {
// Check that resources that need to be torn down on the UI thread are gone.
- DCHECK(!it2me_host_user_interface_.get());
DCHECK(!desktop_environment_factory_.get());
DCHECK(!policy_watcher_.get());
}
@@ -672,6 +652,7 @@ HostNPScriptObject::HostNPScriptObject(
: plugin_(plugin),
parent_(parent),
plugin_task_runner_(plugin_task_runner),
+ plugin_task_runner_handle_(plugin_task_runner_),
am_currently_logging_(false),
state_(kDisconnected),
daemon_controller_(DaemonController::Create()),

Powered by Google App Engine
This is Rietveld 408576698