| 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" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 const protocol::ClipboardEvent& event) { | 360 const protocol::ClipboardEvent& event) { |
| 361 clipboard_stub_->InjectClipboardEvent(event); | 361 clipboard_stub_->InjectClipboardEvent(event); |
| 362 } | 362 } |
| 363 | 363 |
| 364 void IpcDesktopEnvironmentTest::CreateDesktopProcess() { | 364 void IpcDesktopEnvironmentTest::CreateDesktopProcess() { |
| 365 EXPECT_TRUE(task_runner_.get()); | 365 EXPECT_TRUE(task_runner_.get()); |
| 366 EXPECT_TRUE(io_task_runner_.get()); | 366 EXPECT_TRUE(io_task_runner_.get()); |
| 367 | 367 |
| 368 // Create the daemon end of the daemon-to-desktop channel. | 368 // Create the daemon end of the daemon-to-desktop channel. |
| 369 desktop_channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID(); | 369 desktop_channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID(); |
| 370 desktop_channel_.reset( | 370 desktop_channel_ = IPC::ChannelProxy::CreateServer( |
| 371 new IPC::ChannelProxy(IPC::ChannelHandle(desktop_channel_name_), | 371 IPC::ChannelHandle(desktop_channel_name_), |
| 372 IPC::Channel::MODE_SERVER, | 372 &desktop_listener_, |
| 373 &desktop_listener_, | 373 io_task_runner_.get()); |
| 374 io_task_runner_.get())); | |
| 375 | 374 |
| 376 // Create and start the desktop process. | 375 // Create and start the desktop process. |
| 377 desktop_process_.reset(new DesktopProcess(task_runner_, | 376 desktop_process_.reset(new DesktopProcess(task_runner_, |
| 378 io_task_runner_, | 377 io_task_runner_, |
| 379 desktop_channel_name_)); | 378 desktop_channel_name_)); |
| 380 | 379 |
| 381 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory( | 380 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory( |
| 382 new MockDesktopEnvironmentFactory()); | 381 new MockDesktopEnvironmentFactory()); |
| 383 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) | 382 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) |
| 384 .Times(AnyNumber()) | 383 .Times(AnyNumber()) |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 screen_controls_->SetScreenResolution(ScreenResolution( | 641 screen_controls_->SetScreenResolution(ScreenResolution( |
| 643 webrtc::DesktopSize(100, 100), | 642 webrtc::DesktopSize(100, 100), |
| 644 webrtc::DesktopVector(96, 96))); | 643 webrtc::DesktopVector(96, 96))); |
| 645 | 644 |
| 646 task_runner_ = NULL; | 645 task_runner_ = NULL; |
| 647 io_task_runner_ = NULL; | 646 io_task_runner_ = NULL; |
| 648 main_run_loop_.Run(); | 647 main_run_loop_.Run(); |
| 649 } | 648 } |
| 650 | 649 |
| 651 } // namespace remoting | 650 } // namespace remoting |
| OLD | NEW |