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

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: CR feeback and rebased on top of https://chromiumcodereview.appspot.com/11017065/ 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
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 40f136e15ea51c6890497c270869cca77448d318..319ad6705b6f20c561d799634508dec0521a474e 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -309,7 +309,7 @@ void ChromotingHost::OnIncomingSession(
// Create the desktop integration implementation for the client to use.
scoped_ptr<DesktopEnvironment> desktop_environment =
- desktop_environment_factory_->Create();
+ desktop_environment_factory_->Create(this);
// Create a client object.
scoped_ptr<protocol::ConnectionToClient> connection(
@@ -375,6 +375,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);

Powered by Google App Engine
This is Rietveld 408576698