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

Side by Side Diff: webrtc/modules/desktop_capture/screen_capturer_helper.h

Issue 1743203002: Replace scoped_ptr with unique_ptr in webrtc/modules/desktop_capture/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: More Windows reverts 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
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_HELPER_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_HELPER_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_HELPER_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_HELPER_H_
13 13
14 #include "webrtc/base/scoped_ptr.h" 14 #include <memory>
15
15 #include "webrtc/modules/desktop_capture/desktop_geometry.h" 16 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
16 #include "webrtc/modules/desktop_capture/desktop_region.h" 17 #include "webrtc/modules/desktop_capture/desktop_region.h"
17 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" 18 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
18 19
19 namespace webrtc { 20 namespace webrtc {
20 21
21 // ScreenCapturerHelper is intended to be used by an implementation of the 22 // ScreenCapturerHelper is intended to be used by an implementation of the
22 // ScreenCapturer interface. It maintains a thread-safe invalid region, and 23 // ScreenCapturer interface. It maintains a thread-safe invalid region, and
23 // the size of the most recently captured screen, on behalf of the 24 // the size of the most recently captured screen, on behalf of the
24 // ScreenCapturer that owns it. 25 // ScreenCapturer that owns it.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 int log_grid_size, 64 int log_grid_size,
64 DesktopRegion* result); 65 DesktopRegion* result);
65 66
66 private: 67 private:
67 // A region that has been manually invalidated (through InvalidateRegion). 68 // A region that has been manually invalidated (through InvalidateRegion).
68 // These will be returned as dirty_region in the capture data during the next 69 // These will be returned as dirty_region in the capture data during the next
69 // capture. 70 // capture.
70 DesktopRegion invalid_region_; 71 DesktopRegion invalid_region_;
71 72
72 // A lock protecting |invalid_region_| across threads. 73 // A lock protecting |invalid_region_| across threads.
73 rtc::scoped_ptr<RWLockWrapper> invalid_region_lock_; 74 std::unique_ptr<RWLockWrapper> invalid_region_lock_;
74 75
75 // The size of the most recently captured screen. 76 // The size of the most recently captured screen.
76 DesktopSize size_most_recent_; 77 DesktopSize size_most_recent_;
77 78
78 // The log (base 2) of the size of the grid to which the invalid region is 79 // The log (base 2) of the size of the grid to which the invalid region is
79 // expanded. 80 // expanded.
80 // If the value is <= 0, then the invalid region is not expanded to a grid. 81 // If the value is <= 0, then the invalid region is not expanded to a grid.
81 int log_grid_size_; 82 int log_grid_size_;
82 83
83 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerHelper); 84 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerHelper);
84 }; 85 };
85 86
86 } // namespace webrtc 87 } // namespace webrtc
87 88
88 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_HELPER_H_ 89 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698