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

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

Issue 667123002: Standardize usage of virtual/override/final in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/video_scheduler.h ('k') | remoting/protocol/audio_reader.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/host/video_scheduler.h" 5 #include "remoting/host/video_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 private: 74 private:
75 DISALLOW_COPY_AND_ASSIGN(MockVideoEncoder); 75 DISALLOW_COPY_AND_ASSIGN(MockVideoEncoder);
76 }; 76 };
77 77
78 class ThreadCheckVideoEncoder : public VideoEncoderVerbatim { 78 class ThreadCheckVideoEncoder : public VideoEncoderVerbatim {
79 public: 79 public:
80 ThreadCheckVideoEncoder( 80 ThreadCheckVideoEncoder(
81 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 81 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
82 : task_runner_(task_runner) { 82 : task_runner_(task_runner) {
83 } 83 }
84 virtual ~ThreadCheckVideoEncoder() { 84 ~ThreadCheckVideoEncoder() override {
85 EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); 85 EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
86 } 86 }
87 87
88 private: 88 private:
89 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 89 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(ThreadCheckVideoEncoder); 91 DISALLOW_COPY_AND_ASSIGN(ThreadCheckVideoEncoder);
92 }; 92 };
93 93
94 class ThreadCheckDesktopCapturer : public FakeDesktopCapturer { 94 class ThreadCheckDesktopCapturer : public FakeDesktopCapturer {
95 public: 95 public:
96 ThreadCheckDesktopCapturer( 96 ThreadCheckDesktopCapturer(
97 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 97 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
98 : task_runner_(task_runner) { 98 : task_runner_(task_runner) {
99 } 99 }
100 virtual ~ThreadCheckDesktopCapturer() { 100 ~ThreadCheckDesktopCapturer() override {
101 EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); 101 EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
102 } 102 }
103 103
104 private: 104 private:
105 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 105 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(ThreadCheckDesktopCapturer); 107 DISALLOW_COPY_AND_ASSIGN(ThreadCheckDesktopCapturer);
108 }; 108 };
109 109
110 class ThreadCheckMouseCursorMonitor : public FakeMouseCursorMonitor { 110 class ThreadCheckMouseCursorMonitor : public FakeMouseCursorMonitor {
111 public: 111 public:
112 ThreadCheckMouseCursorMonitor( 112 ThreadCheckMouseCursorMonitor(
113 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 113 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
114 : task_runner_(task_runner) { 114 : task_runner_(task_runner) {
115 } 115 }
116 virtual ~ThreadCheckMouseCursorMonitor() { 116 ~ThreadCheckMouseCursorMonitor() override {
117 EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); 117 EXPECT_TRUE(task_runner_->BelongsToCurrentThread());
118 } 118 }
119 119
120 private: 120 private:
121 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 121 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(ThreadCheckMouseCursorMonitor); 123 DISALLOW_COPY_AND_ASSIGN(ThreadCheckMouseCursorMonitor);
124 }; 124 };
125 125
126 class VideoSchedulerTest : public testing::Test { 126 class VideoSchedulerTest : public testing::Test {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 new ThreadCheckMouseCursorMonitor(capture_task_runner_)); 338 new ThreadCheckMouseCursorMonitor(capture_task_runner_));
339 339
340 // Start and stop the scheduler, so it will tear down the screen capturer, 340 // Start and stop the scheduler, so it will tear down the screen capturer,
341 // video encoder and mouse monitor. 341 // video encoder and mouse monitor.
342 StartVideoScheduler(capturer.Pass(), encoder.Pass(), 342 StartVideoScheduler(capturer.Pass(), encoder.Pass(),
343 mouse_cursor_monitor.Pass()); 343 mouse_cursor_monitor.Pass());
344 StopVideoScheduler(); 344 StopVideoScheduler();
345 } 345 }
346 346
347 } // namespace remoting 347 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/video_scheduler.h ('k') | remoting/protocol/audio_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698