| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/process/process.h" | 11 #include "base/process/process.h" |
| 12 #include "base/process/process_handle.h" | 12 #include "base/process/process_handle.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "ipc/attachment_broker_privileged.h" |
| 14 #include "ipc/ipc_channel.h" | 15 #include "ipc/ipc_channel.h" |
| 15 #include "ipc/ipc_channel_proxy.h" | 16 #include "ipc/ipc_channel_proxy.h" |
| 16 #include "ipc/ipc_listener.h" | 17 #include "ipc/ipc_listener.h" |
| 17 #include "ipc/ipc_message.h" | 18 #include "ipc/ipc_message.h" |
| 18 #include "ipc/ipc_platform_file.h" | 19 #include "ipc/ipc_platform_file.h" |
| 19 #include "remoting/base/auto_thread.h" | 20 #include "remoting/base/auto_thread.h" |
| 20 #include "remoting/base/auto_thread_task_runner.h" | 21 #include "remoting/base/auto_thread_task_runner.h" |
| 21 #include "remoting/base/constants.h" | 22 #include "remoting/base/constants.h" |
| 22 #include "remoting/host/chromoting_messages.h" | 23 #include "remoting/host/chromoting_messages.h" |
| 23 #include "remoting/host/desktop_process.h" | 24 #include "remoting/host/desktop_process.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // Runs until there are references to |task_runner_|. | 228 // Runs until there are references to |task_runner_|. |
| 228 base::RunLoop main_run_loop_; | 229 base::RunLoop main_run_loop_; |
| 229 }; | 230 }; |
| 230 | 231 |
| 231 IpcDesktopEnvironmentTest::IpcDesktopEnvironmentTest() | 232 IpcDesktopEnvironmentTest::IpcDesktopEnvironmentTest() |
| 232 : client_jid_("user@domain/rest-of-jid"), | 233 : client_jid_("user@domain/rest-of-jid"), |
| 233 clipboard_stub_(nullptr), | 234 clipboard_stub_(nullptr), |
| 234 remote_input_injector_(nullptr), | 235 remote_input_injector_(nullptr), |
| 235 terminal_id_(-1), | 236 terminal_id_(-1), |
| 236 client_session_control_factory_(&client_session_control_) { | 237 client_session_control_factory_(&client_session_control_) { |
| 238 IPC::AttachmentBrokerPrivileged::CreateBrokerForSingleProcessTests(); |
| 237 } | 239 } |
| 238 | 240 |
| 239 IpcDesktopEnvironmentTest::~IpcDesktopEnvironmentTest() { | 241 IpcDesktopEnvironmentTest::~IpcDesktopEnvironmentTest() { |
| 240 } | 242 } |
| 241 | 243 |
| 242 void IpcDesktopEnvironmentTest::SetUp() { | 244 void IpcDesktopEnvironmentTest::SetUp() { |
| 243 // Arrange to run |message_loop_| until no components depend on it. | 245 // Arrange to run |message_loop_| until no components depend on it. |
| 244 task_runner_ = new AutoThreadTaskRunner( | 246 task_runner_ = new AutoThreadTaskRunner( |
| 245 message_loop_.task_runner(), main_run_loop_.QuitClosure()); | 247 message_loop_.task_runner(), main_run_loop_.QuitClosure()); |
| 246 | 248 |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 .WillOnce(InvokeWithoutArgs( | 736 .WillOnce(InvokeWithoutArgs( |
| 735 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); | 737 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); |
| 736 | 738 |
| 737 // Change the desktop resolution. | 739 // Change the desktop resolution. |
| 738 screen_controls_->SetScreenResolution(ScreenResolution( | 740 screen_controls_->SetScreenResolution(ScreenResolution( |
| 739 webrtc::DesktopSize(100, 100), | 741 webrtc::DesktopSize(100, 100), |
| 740 webrtc::DesktopVector(96, 96))); | 742 webrtc::DesktopVector(96, 96))); |
| 741 } | 743 } |
| 742 | 744 |
| 743 } // namespace remoting | 745 } // namespace remoting |
| OLD | NEW |