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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 const protocol::ClipboardEvent& event) { | 387 const protocol::ClipboardEvent& event) { |
388 clipboard_stub_->InjectClipboardEvent(event); | 388 clipboard_stub_->InjectClipboardEvent(event); |
389 } | 389 } |
390 | 390 |
391 void IpcDesktopEnvironmentTest::CreateDesktopProcess() { | 391 void IpcDesktopEnvironmentTest::CreateDesktopProcess() { |
392 EXPECT_TRUE(task_runner_.get()); | 392 EXPECT_TRUE(task_runner_.get()); |
393 EXPECT_TRUE(io_task_runner_.get()); | 393 EXPECT_TRUE(io_task_runner_.get()); |
394 | 394 |
395 // Create the daemon end of the daemon-to-desktop channel. | 395 // Create the daemon end of the daemon-to-desktop channel. |
396 desktop_channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID(); | 396 desktop_channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID(); |
397 desktop_channel_ = | 397 desktop_channel_ = IPC::ChannelProxy::Create( |
398 IPC::ChannelProxy::Create(IPC::ChannelHandle(desktop_channel_name_), | 398 IPC::ChannelHandle(desktop_channel_name_), IPC::Channel::MODE_SERVER, |
399 IPC::Channel::MODE_SERVER, | 399 &desktop_listener_, io_task_runner_.get()); |
400 &desktop_listener_, | |
401 io_task_runner_.get(), | |
402 nullptr); | |
403 | 400 |
404 // Create and start the desktop process. | 401 // Create and start the desktop process. |
405 desktop_process_.reset(new DesktopProcess(task_runner_, | 402 desktop_process_.reset(new DesktopProcess(task_runner_, |
406 io_task_runner_, | 403 io_task_runner_, |
407 desktop_channel_name_)); | 404 desktop_channel_name_)); |
408 | 405 |
409 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory( | 406 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory( |
410 new MockDesktopEnvironmentFactory()); | 407 new MockDesktopEnvironmentFactory()); |
411 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) | 408 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) |
412 .Times(AnyNumber()) | 409 .Times(AnyNumber()) |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 .WillOnce(InvokeWithoutArgs( | 734 .WillOnce(InvokeWithoutArgs( |
738 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); | 735 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); |
739 | 736 |
740 // Change the desktop resolution. | 737 // Change the desktop resolution. |
741 screen_controls_->SetScreenResolution(ScreenResolution( | 738 screen_controls_->SetScreenResolution(ScreenResolution( |
742 webrtc::DesktopSize(100, 100), | 739 webrtc::DesktopSize(100, 100), |
743 webrtc::DesktopVector(96, 96))); | 740 webrtc::DesktopVector(96, 96))); |
744 } | 741 } |
745 | 742 |
746 } // namespace remoting | 743 } // namespace remoting |
OLD | NEW |