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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 11028128: [Chromoting] Request the daemon to open a terminal once a connection has been accepted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 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/ipc_desktop_environment_factory.cc ('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/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index c502933f34596bfe68b1e60ad1a824d63d0e2aa0..8df3ac7a755c1136c2e154db634ecc26a0666e47 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -41,6 +41,7 @@
#include "remoting/host/curtaining_host_observer.h"
#include "remoting/host/desktop_environment_factory.h"
#include "remoting/host/desktop_resizer.h"
+#include "remoting/host/desktop_session_connector.h"
#include "remoting/host/dns_blackhole_checker.h"
#include "remoting/host/event_executor.h"
#include "remoting/host/heartbeat_sender.h"
@@ -49,6 +50,7 @@
#include "remoting/host/host_exit_codes.h"
#include "remoting/host/host_user_interface.h"
#include "remoting/host/ipc_consts.h"
+#include "remoting/host/ipc_desktop_environment_factory.h"
#include "remoting/host/json_host_config.h"
#include "remoting/host/logging.h"
#include "remoting/host/log_to_server.h"
@@ -113,23 +115,19 @@ void QuitMessageLoop(MessageLoop* message_loop) {
namespace remoting {
class HostProcess
- : public HeartbeatSender::Listener,
- public IPC::Listener,
- public ConfigFileWatcher::Delegate {
+ : public ConfigFileWatcher::Delegate,
+ public HeartbeatSender::Listener,
+ public IPC::Listener {
public:
explicit HostProcess(scoped_ptr<ChromotingHostContext> context)
: context_(context.Pass()),
allow_nat_traversal_(true),
restarting_(false),
shutting_down_(false),
-#if defined(OS_WIN)
- desktop_environment_factory_(new SessionDesktopEnvironmentFactory(
- context_->input_task_runner(), context_->ui_task_runner())),
-#else // !defined(OS_WIN)
- desktop_environment_factory_(new DesktopEnvironmentFactory(
- context_->input_task_runner(), context_->ui_task_runner())),
-#endif // !defined(OS_WIN)
desktop_resizer_(DesktopResizer::Create()),
+#if defined(REMOTING_MULTI_PROCESS)
+ desktop_session_connector_(NULL),
+#endif // defined(REMOTING_MULTI_PROCESS)
exit_code_(kSuccessExitCode) {
network_change_notifier_.reset(net::NetworkChangeNotifier::Create());
curtain_ = CurtainMode::Create(
@@ -300,6 +298,9 @@ class HostProcess
IPC_BEGIN_MESSAGE_MAP(HostProcess, message)
IPC_MESSAGE_HANDLER(ChromotingDaemonNetworkMsg_Configuration,
OnConfigUpdated)
+ IPC_MESSAGE_FORWARD(ChromotingDaemonNetworkMsg_TerminalDisconnected,
+ desktop_session_connector_,
+ DesktopSessionConnector::OnTerminalDisconnected)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -316,6 +317,32 @@ class HostProcess
return;
}
+ // Create a desktop environment factory appropriate to the build type &
+ // platform.
+#if defined(OS_WIN)
+
+#if defined(REMOTING_MULTI_PROCESS)
+ IpcDesktopEnvironmentFactory* desktop_environment_factory =
+ new IpcDesktopEnvironmentFactory(
+ daemon_channel_.get(),
+ context_->input_task_runner(),
+ context_->network_task_runner(),
+ context_->ui_task_runner());
+ desktop_session_connector_ = desktop_environment_factory;
+#else // !defined(REMOTING_MULTI_PROCESS)
+ DesktopEnvironmentFactory* desktop_environment_factory =
+ new SessionDesktopEnvironmentFactory(
+ context_->input_task_runner(), context_->ui_task_runner());
+#endif // !defined(REMOTING_MULTI_PROCESS)
+
+#else // !defined(OS_WIN)
+ DesktopEnvironmentFactory* desktop_environment_factory =
+ new DesktopEnvironmentFactory(
+ context_->input_task_runner(), context_->ui_task_runner());
+#endif // !defined(OS_WIN)
+
+ desktop_environment_factory_.reset(desktop_environment_factory);
+
context_->network_task_runner()->PostTask(
FROM_HERE,
base::Bind(&HostProcess::ListenForShutdownSignal,
@@ -730,6 +757,10 @@ class HostProcess
scoped_refptr<ChromotingHost> host_;
+#if defined(REMOTING_MULTI_PROCESS)
+ DesktopSessionConnector* desktop_session_connector_;
+#endif // defined(REMOTING_MULTI_PROCESS)
+
int exit_code_;
};
« no previous file with comments | « remoting/host/ipc_desktop_environment_factory.cc ('k') | remoting/host/simple_host_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698