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

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

Issue 1803833002: Stop using some scoped_ptr features that unique_ptr doesn't have (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 char* buffer_; 51 char* buffer_;
52 RTC_DISALLOW_COPY_AND_ASSIGN(FakeSharedMemory); 52 RTC_DISALLOW_COPY_AND_ASSIGN(FakeSharedMemory);
53 }; 53 };
54 54
55 class FakeSharedMemoryFactory : public SharedMemoryFactory { 55 class FakeSharedMemoryFactory : public SharedMemoryFactory {
56 public: 56 public:
57 FakeSharedMemoryFactory() {} 57 FakeSharedMemoryFactory() {}
58 ~FakeSharedMemoryFactory() override {} 58 ~FakeSharedMemoryFactory() override {}
59 59
60 rtc::scoped_ptr<SharedMemory> CreateSharedMemory(size_t size) override { 60 rtc::scoped_ptr<SharedMemory> CreateSharedMemory(size_t size) override {
61 return rtc_make_scoped_ptr(new FakeSharedMemory(new char[size], size)); 61 return rtc::scoped_ptr<SharedMemory>(
62 new FakeSharedMemory(new char[size], size));
62 } 63 }
63 64
64 private: 65 private:
65 RTC_DISALLOW_COPY_AND_ASSIGN(FakeSharedMemoryFactory); 66 RTC_DISALLOW_COPY_AND_ASSIGN(FakeSharedMemoryFactory);
66 }; 67 };
67 68
68 TEST_F(ScreenCapturerTest, GetScreenListAndSelectScreen) { 69 TEST_F(ScreenCapturerTest, GetScreenListAndSelectScreen) {
69 webrtc::ScreenCapturer::ScreenList screens; 70 webrtc::ScreenCapturer::ScreenList screens;
70 EXPECT_TRUE(capturer_->GetScreenList(&screens)); 71 EXPECT_TRUE(capturer_->GetScreenList(&screens));
71 for(webrtc::ScreenCapturer::ScreenList::iterator it = screens.begin(); 72 for(webrtc::ScreenCapturer::ScreenList::iterator it = screens.begin();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 135
135 capturer_->Start(&callback_); 136 capturer_->Start(&callback_);
136 capturer_->Capture(DesktopRegion()); 137 capturer_->Capture(DesktopRegion());
137 ASSERT_TRUE(frame); 138 ASSERT_TRUE(frame);
138 delete frame; 139 delete frame;
139 } 140 }
140 141
141 #endif // defined(WEBRTC_WIN) 142 #endif // defined(WEBRTC_WIN)
142 143
143 } // namespace webrtc 144 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698