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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 10916161: Revert 155219 - [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to Cl… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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_script_object.cc ('k') | remoting/host/screen_recorder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
===================================================================
--- remoting/host/remoting_me2me_host.cc (revision 155274)
+++ remoting/host/remoting_me2me_host.cc (working copy)
@@ -37,7 +37,7 @@
#include "remoting/host/chromoting_messages.h"
#include "remoting/host/constants.h"
#include "remoting/host/config_file_watcher.h"
-#include "remoting/host/desktop_environment_factory.h"
+#include "remoting/host/desktop_environment.h"
#include "remoting/host/dns_blackhole_checker.h"
#include "remoting/host/event_executor.h"
#include "remoting/host/heartbeat_sender.h"
@@ -68,7 +68,6 @@
// N.B. OS_WIN is defined by including src/base headers.
#if defined(OS_WIN)
#include <commctrl.h>
-#include "remoting/host/win/session_desktop_environment_factory.h"
#endif // defined(OS_WIN)
#if defined(TOOLKIT_GTK)
@@ -111,11 +110,6 @@
allow_nat_traversal_(true),
restarting_(false),
shutting_down_(false),
-#if defined(OS_WIN)
- desktop_environment_factory_(new SessionDesktopEnvironmentFactory()),
-#else // !defined(OS_WIN)
- desktop_environment_factory_(new DesktopEnvironmentFactory()),
-#endif // !defined(OS_WIN)
exit_code_(kSuccessExitCode)
#if defined(OS_MACOSX)
, curtain_(base::Bind(&HostProcess::OnDisconnectRequested,
@@ -519,6 +513,11 @@
signaling_connector_->EnableOAuth(oauth_credentials.Pass());
}
+ if (!desktop_environment_.get()) {
+ desktop_environment_ =
+ DesktopEnvironment::CreateForService(context_.get());
+ }
+
NetworkSettings network_settings(
allow_nat_traversal_ ?
NetworkSettings::NAT_TRAVERSAL_ENABLED :
@@ -529,8 +528,7 @@
}
host_ = new ChromotingHost(
- context_.get(), signal_strategy_.get(),
- desktop_environment_factory_.get(),
+ context_.get(), signal_strategy_.get(), desktop_environment_.get(),
CreateHostSessionManager(network_settings,
context_->url_request_context_getter()));
@@ -628,6 +626,7 @@
void ResetHost() {
DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
+ desktop_environment_.reset();
host_event_logger_.reset();
log_to_server_.reset();
heartbeat_sender_.reset();
@@ -662,9 +661,9 @@
bool restarting_;
bool shutting_down_;
- scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_;
scoped_ptr<XmppSignalStrategy> signal_strategy_;
scoped_ptr<SignalingConnector> signaling_connector_;
+ scoped_ptr<DesktopEnvironment> desktop_environment_;
scoped_ptr<HeartbeatSender> heartbeat_sender_;
scoped_ptr<LogToServer> log_to_server_;
scoped_ptr<HostEventLogger> host_event_logger_;
« no previous file with comments | « remoting/host/plugin/host_script_object.cc ('k') | remoting/host/screen_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698