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

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

Issue 628753002: replace OVERRIDE and FINAL with override and final in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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
« no previous file with comments | « remoting/host/ipc_desktop_environment.h ('k') | remoting/host/ipc_host_event_logger.h » ('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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 namespace { 49 namespace {
50 50
51 // Receives messages sent from the network process to the daemon. 51 // Receives messages sent from the network process to the daemon.
52 class FakeDaemonSender : public IPC::Sender { 52 class FakeDaemonSender : public IPC::Sender {
53 public: 53 public:
54 FakeDaemonSender() {} 54 FakeDaemonSender() {}
55 virtual ~FakeDaemonSender() {} 55 virtual ~FakeDaemonSender() {}
56 56
57 // IPC::Sender implementation. 57 // IPC::Sender implementation.
58 virtual bool Send(IPC::Message* message) OVERRIDE; 58 virtual bool Send(IPC::Message* message) override;
59 59
60 MOCK_METHOD3(ConnectTerminal, void(int, const ScreenResolution&, bool)); 60 MOCK_METHOD3(ConnectTerminal, void(int, const ScreenResolution&, bool));
61 MOCK_METHOD1(DisconnectTerminal, void(int)); 61 MOCK_METHOD1(DisconnectTerminal, void(int));
62 MOCK_METHOD2(SetScreenResolution, void(int, const ScreenResolution&)); 62 MOCK_METHOD2(SetScreenResolution, void(int, const ScreenResolution&));
63 63
64 private: 64 private:
65 void OnMessageReceived(const IPC::Message& message); 65 void OnMessageReceived(const IPC::Message& message);
66 66
67 DISALLOW_COPY_AND_ASSIGN(FakeDaemonSender); 67 DISALLOW_COPY_AND_ASSIGN(FakeDaemonSender);
68 }; 68 };
69 69
70 // Receives messages sent from the desktop process to the daemon. 70 // Receives messages sent from the desktop process to the daemon.
71 class MockDaemonListener : public IPC::Listener { 71 class MockDaemonListener : public IPC::Listener {
72 public: 72 public:
73 MockDaemonListener() {} 73 MockDaemonListener() {}
74 virtual ~MockDaemonListener() {} 74 virtual ~MockDaemonListener() {}
75 75
76 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 76 virtual bool OnMessageReceived(const IPC::Message& message) override;
77 77
78 MOCK_METHOD1(OnDesktopAttached, void(IPC::PlatformFileForTransit)); 78 MOCK_METHOD1(OnDesktopAttached, void(IPC::PlatformFileForTransit));
79 MOCK_METHOD1(OnChannelConnected, void(int32)); 79 MOCK_METHOD1(OnChannelConnected, void(int32));
80 MOCK_METHOD0(OnChannelError, void()); 80 MOCK_METHOD0(OnChannelError, void());
81 81
82 private: 82 private:
83 DISALLOW_COPY_AND_ASSIGN(MockDaemonListener); 83 DISALLOW_COPY_AND_ASSIGN(MockDaemonListener);
84 }; 84 };
85 85
86 bool FakeDaemonSender::Send(IPC::Message* message) { 86 bool FakeDaemonSender::Send(IPC::Message* message) {
(...skipping 29 matching lines...) Expand all
116 return handled; 116 return handled;
117 } 117 }
118 118
119 } // namespace 119 } // namespace
120 120
121 class IpcDesktopEnvironmentTest : public testing::Test { 121 class IpcDesktopEnvironmentTest : public testing::Test {
122 public: 122 public:
123 IpcDesktopEnvironmentTest(); 123 IpcDesktopEnvironmentTest();
124 virtual ~IpcDesktopEnvironmentTest(); 124 virtual ~IpcDesktopEnvironmentTest();
125 125
126 virtual void SetUp() OVERRIDE; 126 virtual void SetUp() override;
127 127
128 void ConnectTerminal(int terminal_id, 128 void ConnectTerminal(int terminal_id,
129 const ScreenResolution& resolution, 129 const ScreenResolution& resolution,
130 bool virtual_terminal); 130 bool virtual_terminal);
131 void DisconnectTerminal(int terminal_id); 131 void DisconnectTerminal(int terminal_id);
132 132
133 // Creates a DesktopEnvironment with a fake webrtc::DesktopCapturer, to mock 133 // Creates a DesktopEnvironment with a fake webrtc::DesktopCapturer, to mock
134 // DesktopEnvironmentFactory::Create(). 134 // DesktopEnvironmentFactory::Create().
135 DesktopEnvironment* CreateDesktopEnvironment(); 135 DesktopEnvironment* CreateDesktopEnvironment();
136 136
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 screen_controls_->SetScreenResolution(ScreenResolution( 655 screen_controls_->SetScreenResolution(ScreenResolution(
656 webrtc::DesktopSize(100, 100), 656 webrtc::DesktopSize(100, 100),
657 webrtc::DesktopVector(96, 96))); 657 webrtc::DesktopVector(96, 96)));
658 658
659 task_runner_ = NULL; 659 task_runner_ = NULL;
660 io_task_runner_ = NULL; 660 io_task_runner_ = NULL;
661 main_run_loop_.Run(); 661 main_run_loop_.Run();
662 } 662 }
663 663
664 } // namespace remoting 664 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/ipc_desktop_environment.h ('k') | remoting/host/ipc_host_event_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698