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

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

Issue 1830853002: Make PlatformFileForTransit a class on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from mseaborn. Created 4 years, 8 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
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/host/desktop_session_proxy.cc » ('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/desktop_session_agent.h" 5 #include "remoting/host/desktop_session_agent.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/shared_memory.h" 12 #include "base/memory/shared_memory.h"
13 #include "base/process/process_handle.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "ipc/ipc_channel_proxy.h" 15 #include "ipc/ipc_channel_proxy.h"
15 #include "ipc/ipc_message.h" 16 #include "ipc/ipc_message.h"
16 #include "ipc/ipc_message_macros.h" 17 #include "ipc/ipc_message_macros.h"
17 #include "remoting/base/auto_thread_task_runner.h" 18 #include "remoting/base/auto_thread_task_runner.h"
18 #include "remoting/base/constants.h" 19 #include "remoting/base/constants.h"
19 #include "remoting/host/audio_capturer.h" 20 #include "remoting/host/audio_capturer.h"
20 #include "remoting/host/chromoting_messages.h" 21 #include "remoting/host/chromoting_messages.h"
21 #include "remoting/host/desktop_environment.h" 22 #include "remoting/host/desktop_environment.h"
22 #include "remoting/host/input_injector.h" 23 #include "remoting/host/input_injector.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 395
395 delegate_ = delegate; 396 delegate_ = delegate;
396 397
397 // Create an IPC channel to communicate with the network process. 398 // Create an IPC channel to communicate with the network process.
398 bool result = CreateConnectedIpcChannel(io_task_runner_, 399 bool result = CreateConnectedIpcChannel(io_task_runner_,
399 this, 400 this,
400 &desktop_pipe_, 401 &desktop_pipe_,
401 &network_channel_); 402 &network_channel_);
402 base::PlatformFile raw_desktop_pipe = desktop_pipe_.GetPlatformFile(); 403 base::PlatformFile raw_desktop_pipe = desktop_pipe_.GetPlatformFile();
403 #if defined(OS_WIN) 404 #if defined(OS_WIN)
404 *desktop_pipe_out = IPC::PlatformFileForTransit(raw_desktop_pipe); 405 *desktop_pipe_out =
406 IPC::PlatformFileForTransit(raw_desktop_pipe, base::GetCurrentProcId());
405 #elif defined(OS_POSIX) 407 #elif defined(OS_POSIX)
406 *desktop_pipe_out = IPC::PlatformFileForTransit(raw_desktop_pipe, false); 408 *desktop_pipe_out = IPC::PlatformFileForTransit(raw_desktop_pipe, false);
407 #else 409 #else
408 #error Unsupported platform. 410 #error Unsupported platform.
409 #endif 411 #endif
410 return result; 412 return result;
411 } 413 }
412 414
413 void DesktopSessionAgent::Stop() { 415 void DesktopSessionAgent::Stop() {
414 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 416 DCHECK(caller_task_runner_->BelongsToCurrentThread());
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 } 574 }
573 } 575 }
574 576
575 void DesktopSessionAgent::StopAudioCapturer() { 577 void DesktopSessionAgent::StopAudioCapturer() {
576 DCHECK(audio_capture_task_runner_->BelongsToCurrentThread()); 578 DCHECK(audio_capture_task_runner_->BelongsToCurrentThread());
577 579
578 audio_capturer_.reset(); 580 audio_capturer_.reset();
579 } 581 }
580 582
581 } // namespace remoting 583 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698