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

Side by Side Diff: webrtc/modules/desktop_capture/desktop_and_cursor_composer_unittest.cc

Issue 1678073003: Cleanup shared memory handling in DesktopCapturer interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 class DesktopAndCursorComposerTest : public testing::Test, 161 class DesktopAndCursorComposerTest : public testing::Test,
162 public DesktopCapturer::Callback { 162 public DesktopCapturer::Callback {
163 public: 163 public:
164 DesktopAndCursorComposerTest() 164 DesktopAndCursorComposerTest()
165 : fake_screen_(new FakeScreenCapturer()), 165 : fake_screen_(new FakeScreenCapturer()),
166 fake_cursor_(new FakeMouseMonitor()), 166 fake_cursor_(new FakeMouseMonitor()),
167 blender_(fake_screen_, fake_cursor_) { 167 blender_(fake_screen_, fake_cursor_) {
168 } 168 }
169 169
170 // DesktopCapturer::Callback interface 170 // DesktopCapturer::Callback interface
171 SharedMemory* CreateSharedMemory(size_t size) override { return NULL; }
172
173 void OnCaptureCompleted(DesktopFrame* frame) override { frame_.reset(frame); } 171 void OnCaptureCompleted(DesktopFrame* frame) override { frame_.reset(frame); }
174 172
175 protected: 173 protected:
176 // Owned by |blender_|. 174 // Owned by |blender_|.
177 FakeScreenCapturer* fake_screen_; 175 FakeScreenCapturer* fake_screen_;
178 FakeMouseMonitor* fake_cursor_; 176 FakeMouseMonitor* fake_cursor_;
179 177
180 DesktopAndCursorComposer blender_; 178 DesktopAndCursorComposer blender_;
181 rtc::scoped_ptr<DesktopFrame> frame_; 179 rtc::scoped_ptr<DesktopFrame> frame_;
182 }; 180 };
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Verify that the cursor is erased before the frame buffer is returned to 239 // Verify that the cursor is erased before the frame buffer is returned to
242 // the screen capturer. 240 // the screen capturer.
243 frame_.reset(); 241 frame_.reset();
244 VerifyFrame(*frame, MouseCursorMonitor::OUTSIDE, DesktopVector()); 242 VerifyFrame(*frame, MouseCursorMonitor::OUTSIDE, DesktopVector());
245 } 243 }
246 } 244 }
247 245
248 } // namespace 246 } // namespace
249 247
250 } // namespace webrtc 248 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_and_cursor_composer.cc ('k') | webrtc/modules/desktop_capture/desktop_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698