| OLD | NEW |
| 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 "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "ipc/ipc_channel_proxy.h" | 9 #include "ipc/ipc_channel_proxy.h" |
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 scoped_refptr<AutoThreadTaskRunner> audio_capture_task_runner, | 483 scoped_refptr<AutoThreadTaskRunner> audio_capture_task_runner, |
| 484 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, | 484 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |
| 485 scoped_refptr<AutoThreadTaskRunner> input_task_runner, | 485 scoped_refptr<AutoThreadTaskRunner> input_task_runner, |
| 486 scoped_refptr<AutoThreadTaskRunner> io_task_runner, | 486 scoped_refptr<AutoThreadTaskRunner> io_task_runner, |
| 487 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner) | 487 scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner) |
| 488 : audio_capture_task_runner_(audio_capture_task_runner), | 488 : audio_capture_task_runner_(audio_capture_task_runner), |
| 489 caller_task_runner_(caller_task_runner), | 489 caller_task_runner_(caller_task_runner), |
| 490 input_task_runner_(input_task_runner), | 490 input_task_runner_(input_task_runner), |
| 491 io_task_runner_(io_task_runner), | 491 io_task_runner_(io_task_runner), |
| 492 video_capture_task_runner_(video_capture_task_runner), | 492 video_capture_task_runner_(video_capture_task_runner), |
| 493 control_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 493 control_factory_(this), |
| 494 desktop_pipe_(IPC::InvalidPlatformFileForTransit()), | 494 desktop_pipe_(IPC::InvalidPlatformFileForTransit()), |
| 495 current_size_(SkISize::Make(0, 0)), | 495 current_size_(SkISize::Make(0, 0)), |
| 496 next_shared_buffer_id_(1), | 496 next_shared_buffer_id_(1), |
| 497 started_(false) { | 497 started_(false) { |
| 498 DCHECK(caller_task_runner_->BelongsToCurrentThread()); | 498 DCHECK(caller_task_runner_->BelongsToCurrentThread()); |
| 499 } | 499 } |
| 500 | 500 |
| 501 void DesktopSessionAgent::CloseDesktopPipeHandle() { | 501 void DesktopSessionAgent::CloseDesktopPipeHandle() { |
| 502 if (!(desktop_pipe_ == IPC::InvalidPlatformFileForTransit())) { | 502 if (!(desktop_pipe_ == IPC::InvalidPlatformFileForTransit())) { |
| 503 #if defined(OS_WIN) | 503 #if defined(OS_WIN) |
| 504 base::ClosePlatformFile(desktop_pipe_); | 504 base::ClosePlatformFile(desktop_pipe_); |
| 505 #elif defined(OS_POSIX) | 505 #elif defined(OS_POSIX) |
| 506 base::ClosePlatformFile(desktop_pipe_.fd); | 506 base::ClosePlatformFile(desktop_pipe_.fd); |
| 507 #else // !defined(OS_POSIX) | 507 #else // !defined(OS_POSIX) |
| 508 #error Unsupported platform. | 508 #error Unsupported platform. |
| 509 #endif // !defined(OS_POSIX) | 509 #endif // !defined(OS_POSIX) |
| 510 | 510 |
| 511 desktop_pipe_ = IPC::InvalidPlatformFileForTransit(); | 511 desktop_pipe_ = IPC::InvalidPlatformFileForTransit(); |
| 512 } | 512 } |
| 513 } | 513 } |
| 514 | 514 |
| 515 } // namespace remoting | 515 } // namespace remoting |
| OLD | NEW |