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

Side by Side Diff: webrtc/modules/desktop_capture/window_capturer_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
« no previous file with comments | « webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12 matching lines...) Expand all
23 public DesktopCapturer::Callback { 23 public DesktopCapturer::Callback {
24 public: 24 public:
25 void SetUp() override { 25 void SetUp() override {
26 capturer_.reset( 26 capturer_.reset(
27 WindowCapturer::Create(DesktopCaptureOptions::CreateDefault())); 27 WindowCapturer::Create(DesktopCaptureOptions::CreateDefault()));
28 } 28 }
29 29
30 void TearDown() override {} 30 void TearDown() override {}
31 31
32 // DesktopCapturer::Callback interface 32 // DesktopCapturer::Callback interface
33 SharedMemory* CreateSharedMemory(size_t size) override { return NULL; }
34
35 void OnCaptureCompleted(DesktopFrame* frame) override { frame_.reset(frame); } 33 void OnCaptureCompleted(DesktopFrame* frame) override { frame_.reset(frame); }
36 34
37 protected: 35 protected:
38 rtc::scoped_ptr<WindowCapturer> capturer_; 36 rtc::scoped_ptr<WindowCapturer> capturer_;
39 rtc::scoped_ptr<DesktopFrame> frame_; 37 rtc::scoped_ptr<DesktopFrame> frame_;
40 }; 38 };
41 39
42 // Verify that we can enumerate windows. 40 // Verify that we can enumerate windows.
43 TEST_F(WindowCapturerTest, Enumerate) { 41 TEST_F(WindowCapturerTest, Enumerate) {
44 WindowCapturer::WindowList windows; 42 WindowCapturer::WindowList windows;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 79 }
82 continue; 80 continue;
83 } 81 }
84 82
85 EXPECT_GT(frame_->size().width(), 0); 83 EXPECT_GT(frame_->size().width(), 0);
86 EXPECT_GT(frame_->size().height(), 0); 84 EXPECT_GT(frame_->size().height(), 0);
87 } 85 }
88 } 86 }
89 87
90 } // namespace webrtc 88 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698