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

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

Issue 310853003: Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/ipc_util_posix.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) 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
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_ =
371 new IPC::ChannelProxy(IPC::ChannelHandle(desktop_channel_name_), 371 IPC::ChannelProxy::Create(IPC::ChannelHandle(desktop_channel_name_),
372 IPC::Channel::MODE_SERVER, 372 IPC::Channel::MODE_SERVER,
373 &desktop_listener_, 373 &desktop_listener_,
374 io_task_runner_.get())); 374 io_task_runner_.get());
375 375
376 // Create and start the desktop process. 376 // Create and start the desktop process.
377 desktop_process_.reset(new DesktopProcess(task_runner_, 377 desktop_process_.reset(new DesktopProcess(task_runner_,
378 io_task_runner_, 378 io_task_runner_,
379 desktop_channel_name_)); 379 desktop_channel_name_));
380 380
381 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory( 381 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory(
382 new MockDesktopEnvironmentFactory()); 382 new MockDesktopEnvironmentFactory());
383 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) 383 EXPECT_CALL(*desktop_environment_factory, CreatePtr())
384 .Times(AnyNumber()) 384 .Times(AnyNumber())
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 screen_controls_->SetScreenResolution(ScreenResolution( 642 screen_controls_->SetScreenResolution(ScreenResolution(
643 webrtc::DesktopSize(100, 100), 643 webrtc::DesktopSize(100, 100),
644 webrtc::DesktopVector(96, 96))); 644 webrtc::DesktopVector(96, 96)));
645 645
646 task_runner_ = NULL; 646 task_runner_ = NULL;
647 io_task_runner_ = NULL; 647 io_task_runner_ = NULL;
648 main_run_loop_.Run(); 648 main_run_loop_.Run();
649 } 649 }
650 650
651 } // namespace remoting 651 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/ipc_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698