OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |