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

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

Issue 15782010: Update remoting/ and jingle/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/host_port_allocator.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.h" 10 #include "base/message_loop.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // Trigger DisconnectTerminal(). 348 // Trigger DisconnectTerminal().
349 desktop_environment_.reset(); 349 desktop_environment_.reset();
350 } 350 }
351 351
352 void IpcDesktopEnvironmentTest::ReflectClipboardEvent( 352 void IpcDesktopEnvironmentTest::ReflectClipboardEvent(
353 const protocol::ClipboardEvent& event) { 353 const protocol::ClipboardEvent& event) {
354 clipboard_stub_->InjectClipboardEvent(event); 354 clipboard_stub_->InjectClipboardEvent(event);
355 } 355 }
356 356
357 void IpcDesktopEnvironmentTest::CreateDesktopProcess() { 357 void IpcDesktopEnvironmentTest::CreateDesktopProcess() {
358 EXPECT_TRUE(task_runner_); 358 EXPECT_TRUE(task_runner_.get());
359 EXPECT_TRUE(io_task_runner_); 359 EXPECT_TRUE(io_task_runner_.get());
360 360
361 // Create the daemon end of the daemon-to-desktop channel. 361 // Create the daemon end of the daemon-to-desktop channel.
362 desktop_channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID(); 362 desktop_channel_name_ = IPC::Channel::GenerateUniqueRandomChannelID();
363 desktop_channel_.reset(new IPC::ChannelProxy( 363 desktop_channel_.reset(
364 IPC::ChannelHandle(desktop_channel_name_), 364 new IPC::ChannelProxy(IPC::ChannelHandle(desktop_channel_name_),
365 IPC::Channel::MODE_SERVER, 365 IPC::Channel::MODE_SERVER,
366 &desktop_listener_, 366 &desktop_listener_,
367 io_task_runner_)); 367 io_task_runner_.get()));
368 368
369 // Create and start the desktop process. 369 // Create and start the desktop process.
370 desktop_process_.reset(new DesktopProcess(task_runner_, 370 desktop_process_.reset(new DesktopProcess(task_runner_,
371 io_task_runner_, 371 io_task_runner_,
372 desktop_channel_name_)); 372 desktop_channel_name_));
373 373
374 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory( 374 scoped_ptr<MockDesktopEnvironmentFactory> desktop_environment_factory(
375 new MockDesktopEnvironmentFactory()); 375 new MockDesktopEnvironmentFactory());
376 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) 376 EXPECT_CALL(*desktop_environment_factory, CreatePtr())
377 .Times(AnyNumber()) 377 .Times(AnyNumber())
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 event.set_x(0); 612 event.set_x(0);
613 event.set_y(0); 613 event.set_y(0);
614 input_injector_->InjectMouseEvent(event); 614 input_injector_->InjectMouseEvent(event);
615 615
616 task_runner_ = NULL; 616 task_runner_ = NULL;
617 io_task_runner_ = NULL; 617 io_task_runner_ = NULL;
618 main_run_loop_.Run(); 618 main_run_loop_.Run();
619 } 619 }
620 620
621 } // namespace remoting 621 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_port_allocator.cc ('k') | remoting/host/ipc_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698