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

Side by Side Diff: remoting/host/ipc_desktop_environment.cc

Issue 12678008: Reworked the plumbing required to pass the client resolution to the desktop resizer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/ipc_desktop_environment.h" 5 #include "remoting/host/ipc_desktop_environment.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 bool IpcDesktopEnvironmentFactory::SupportsAudioCapture() const { 109 bool IpcDesktopEnvironmentFactory::SupportsAudioCapture() const {
110 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 110 DCHECK(caller_task_runner_->BelongsToCurrentThread());
111 111
112 return AudioCapturer::IsSupported(); 112 return AudioCapturer::IsSupported();
113 } 113 }
114 114
115 void IpcDesktopEnvironmentFactory::ConnectTerminal( 115 void IpcDesktopEnvironmentFactory::ConnectTerminal(
116 DesktopSessionProxy* desktop_session_proxy, 116 DesktopSessionProxy* desktop_session_proxy,
117 const DesktopSessionParams& params, 117 const ScreenResolution& resolution,
118 bool virtual_terminal) { 118 bool virtual_terminal) {
119 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 119 DCHECK(caller_task_runner_->BelongsToCurrentThread());
120 120
121 int id = next_id_++; 121 int id = next_id_++;
122 bool inserted = active_connections_.insert( 122 bool inserted = active_connections_.insert(
123 std::make_pair(id, desktop_session_proxy)).second; 123 std::make_pair(id, desktop_session_proxy)).second;
124 CHECK(inserted); 124 CHECK(inserted);
125 125
126 VLOG(1) << "Network: registered desktop environment " << id; 126 VLOG(1) << "Network: registered desktop environment " << id;
127 127
128 daemon_channel_->Send(new ChromotingNetworkHostMsg_ConnectTerminal( 128 daemon_channel_->Send(new ChromotingNetworkHostMsg_ConnectTerminal(
129 id, params, virtual_terminal)); 129 id, resolution, virtual_terminal));
130 } 130 }
131 131
132 void IpcDesktopEnvironmentFactory::DisconnectTerminal( 132 void IpcDesktopEnvironmentFactory::DisconnectTerminal(
133 DesktopSessionProxy* desktop_session_proxy) { 133 DesktopSessionProxy* desktop_session_proxy) {
134 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 134 DCHECK(caller_task_runner_->BelongsToCurrentThread());
135 135
136 ActiveConnectionsList::iterator i; 136 ActiveConnectionsList::iterator i;
137 for (i = active_connections_.begin(); i != active_connections_.end(); ++i) { 137 for (i = active_connections_.begin(); i != active_connections_.end(); ++i) {
138 if (i->second == desktop_session_proxy) 138 if (i->second == desktop_session_proxy)
139 break; 139 break;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (i != active_connections_.end()) { 186 if (i != active_connections_.end()) {
187 DesktopSessionProxy* desktop_session_proxy = i->second; 187 DesktopSessionProxy* desktop_session_proxy = i->second;
188 active_connections_.erase(i); 188 active_connections_.erase(i);
189 189
190 // Disconnect the client session. 190 // Disconnect the client session.
191 desktop_session_proxy->DisconnectSession(); 191 desktop_session_proxy->DisconnectSession();
192 } 192 }
193 } 193 }
194 194
195 } // namespace remoting 195 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/ipc_desktop_environment.h ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698