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

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

Issue 2468523003: Pass the desktop session ID to the remoting network process. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « remoting/host/daemon_process_unittest.cc ('k') | remoting/host/desktop_session_connector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/daemon_process.h" 5 #include "remoting/host/daemon_process.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 ~DaemonProcessWin() override; 76 ~DaemonProcessWin() override;
77 77
78 // WorkerProcessIpcDelegate implementation. 78 // WorkerProcessIpcDelegate implementation.
79 void OnChannelConnected(int32_t peer_pid) override; 79 void OnChannelConnected(int32_t peer_pid) override;
80 void OnPermanentError(int exit_code) override; 80 void OnPermanentError(int exit_code) override;
81 81
82 // DaemonProcess overrides. 82 // DaemonProcess overrides.
83 void SendToNetwork(IPC::Message* message) override; 83 void SendToNetwork(IPC::Message* message) override;
84 bool OnDesktopSessionAgentAttached( 84 bool OnDesktopSessionAgentAttached(
85 int terminal_id, 85 int terminal_id,
86 int session_id,
86 const IPC::ChannelHandle& desktop_pipe) override; 87 const IPC::ChannelHandle& desktop_pipe) override;
87 88
88 protected: 89 protected:
89 // DaemonProcess implementation. 90 // DaemonProcess implementation.
90 std::unique_ptr<DesktopSession> DoCreateDesktopSession( 91 std::unique_ptr<DesktopSession> DoCreateDesktopSession(
91 int terminal_id, 92 int terminal_id,
92 const ScreenResolution& resolution, 93 const ScreenResolution& resolution,
93 bool virtual_terminal) override; 94 bool virtual_terminal) override;
94 void DoCrashNetworkProcess( 95 void DoCrashNetworkProcess(
95 const tracked_objects::Location& location) override; 96 const tracked_objects::Location& location) override;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void DaemonProcessWin::SendToNetwork(IPC::Message* message) { 168 void DaemonProcessWin::SendToNetwork(IPC::Message* message) {
168 if (network_launcher_) { 169 if (network_launcher_) {
169 network_launcher_->Send(message); 170 network_launcher_->Send(message);
170 } else { 171 } else {
171 delete message; 172 delete message;
172 } 173 }
173 } 174 }
174 175
175 bool DaemonProcessWin::OnDesktopSessionAgentAttached( 176 bool DaemonProcessWin::OnDesktopSessionAgentAttached(
176 int terminal_id, 177 int terminal_id,
178 int session_id,
177 const IPC::ChannelHandle& desktop_pipe) { 179 const IPC::ChannelHandle& desktop_pipe) {
178 SendToNetwork(new ChromotingDaemonNetworkMsg_DesktopAttached( 180 SendToNetwork(new ChromotingDaemonNetworkMsg_DesktopAttached(
179 terminal_id, desktop_pipe)); 181 terminal_id, session_id, desktop_pipe));
180 return true; 182 return true;
181 } 183 }
182 184
183 std::unique_ptr<DesktopSession> DaemonProcessWin::DoCreateDesktopSession( 185 std::unique_ptr<DesktopSession> DaemonProcessWin::DoCreateDesktopSession(
184 int terminal_id, 186 int terminal_id,
185 const ScreenResolution& resolution, 187 const ScreenResolution& resolution,
186 bool virtual_terminal) { 188 bool virtual_terminal) {
187 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 189 DCHECK(caller_task_runner()->BelongsToCurrentThread());
188 190
189 if (virtual_terminal) { 191 if (virtual_terminal) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 << "\\" << kPairingRegistrySecretsKeyName; 371 << "\\" << kPairingRegistrySecretsKeyName;
370 return false; 372 return false;
371 } 373 }
372 374
373 pairing_registry_privileged_key_.Set(privileged.Take()); 375 pairing_registry_privileged_key_.Set(privileged.Take());
374 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); 376 pairing_registry_unprivileged_key_.Set(unprivileged.Take());
375 return true; 377 return true;
376 } 378 }
377 379
378 } // namespace remoting 380 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/daemon_process_unittest.cc ('k') | remoting/host/desktop_session_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698