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

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

Issue 1923133002: Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Don't remove #include "scoped_ptr.h" from .h files Created 4 years, 7 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_DESKTOP_CAPTURER_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_
13 13
14 #include <stddef.h> 14 #include <stddef.h>
15 15
16 #include <memory>
17
16 #include "webrtc/base/scoped_ptr.h" 18 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/modules/desktop_capture/desktop_capture_types.h" 19 #include "webrtc/modules/desktop_capture/desktop_capture_types.h"
18 #include "webrtc/modules/desktop_capture/shared_memory.h" 20 #include "webrtc/modules/desktop_capture/shared_memory.h"
19 21
20 namespace webrtc { 22 namespace webrtc {
21 23
22 class DesktopFrame; 24 class DesktopFrame;
23 class DesktopRegion; 25 class DesktopRegion;
24 26
25 // Abstract interface for screen and window capturers. 27 // Abstract interface for screen and window capturers.
(...skipping 15 matching lines...) Expand all
41 43
42 // Called at the beginning of a capturing session. |callback| must remain 44 // Called at the beginning of a capturing session. |callback| must remain
43 // valid until capturer is destroyed. 45 // valid until capturer is destroyed.
44 virtual void Start(Callback* callback) = 0; 46 virtual void Start(Callback* callback) = 0;
45 47
46 // Sets SharedMemoryFactory that will be used to create buffers for the 48 // Sets SharedMemoryFactory that will be used to create buffers for the
47 // captured frames. The factory can be invoked on a thread other than the one 49 // captured frames. The factory can be invoked on a thread other than the one
48 // where Capture() is called. It will be destroyed on the same thread. Shared 50 // where Capture() is called. It will be destroyed on the same thread. Shared
49 // memory is currently supported only by some DesktopCapturer implementations. 51 // memory is currently supported only by some DesktopCapturer implementations.
50 virtual void SetSharedMemoryFactory( 52 virtual void SetSharedMemoryFactory(
51 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) {} 53 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {}
52 54
53 // Captures next frame. |region| specifies region of the capture target that 55 // Captures next frame. |region| specifies region of the capture target that
54 // should be fresh in the resulting frame. The frame may also include fresh 56 // should be fresh in the resulting frame. The frame may also include fresh
55 // data for areas outside |region|. In that case capturer will include these 57 // data for areas outside |region|. In that case capturer will include these
56 // areas in updated_region() of the frame. |region| is specified relative to 58 // areas in updated_region() of the frame. |region| is specified relative to
57 // the top left corner of the capture target. Pending capture operations are 59 // the top left corner of the capture target. Pending capture operations are
58 // canceled when DesktopCapturer is deleted. 60 // canceled when DesktopCapturer is deleted.
59 virtual void Capture(const DesktopRegion& region) = 0; 61 virtual void Capture(const DesktopRegion& region) = 0;
60 62
61 // Sets the window to be excluded from the captured image in the future 63 // Sets the window to be excluded from the captured image in the future
62 // Capture calls. Used to exclude the screenshare notification window for 64 // Capture calls. Used to exclude the screenshare notification window for
63 // screen capturing. 65 // screen capturing.
64 virtual void SetExcludedWindow(WindowId window) {} 66 virtual void SetExcludedWindow(WindowId window) {}
65 }; 67 };
66 68
67 } // namespace webrtc 69 } // namespace webrtc
68 70
69 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ 71 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_
70 72
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698