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

Unified Diff: remoting/host/chromoting_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/chromoting_host.h ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 40f136e15ea51c6890497c270869cca77448d318..6fe3d11a7d756bf17e501dd7c21a935850538791 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -11,7 +11,6 @@
#include "build/build_config.h"
#include "remoting/base/constants.h"
#include "remoting/host/chromoting_host_context.h"
-#include "remoting/host/desktop_environment.h"
#include "remoting/host/desktop_environment_factory.h"
#include "remoting/host/event_executor.h"
#include "remoting/host/host_config.h"
@@ -307,10 +306,6 @@ void ChromotingHost::OnIncomingSession(
LOG(INFO) << "Client connected: " << session->jid();
- // Create the desktop integration implementation for the client to use.
- scoped_ptr<DesktopEnvironment> desktop_environment =
- desktop_environment_factory_->Create();
-
// Create a client object.
scoped_ptr<protocol::ConnectionToClient> connection(
new protocol::ConnectionToClient(session));
@@ -320,7 +315,7 @@ void ChromotingHost::OnIncomingSession(
encode_task_runner_,
network_task_runner_,
connection.Pass(),
- desktop_environment.Pass(),
+ desktop_environment_factory_,
max_session_duration_);
clients_.push_back(client);
clients_count_++;
@@ -375,6 +370,17 @@ void ChromotingHost::DisconnectAllClients() {
}
}
+void ChromotingHost::DisconnectClient(DesktopEnvironment* desktop_environment) {
+ DCHECK(network_task_runner_->BelongsToCurrentThread());
+
+ for (ClientList::iterator i = clients_.begin(); i != clients_.end(); ++i) {
+ if ((*i)->desktop_environment() == desktop_environment) {
+ (*i)->Disconnect();
+ break;
+ }
+ }
+}
+
void ChromotingHost::SetUiStrings(const UiStrings& ui_strings) {
DCHECK(network_task_runner_->BelongsToCurrentThread());
DCHECK_EQ(state_, kInitial);
« no previous file with comments | « remoting/host/chromoting_host.h ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698