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

Side by Side Diff: webrtc/modules/desktop_capture/mouse_cursor.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_MOUSE_CURSOR_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_H_
13 13
14 #include <memory>
15
14 #include "webrtc/base/constructormagic.h" 16 #include "webrtc/base/constructormagic.h"
15 #include "webrtc/base/scoped_ptr.h"
16 #include "webrtc/modules/desktop_capture/desktop_geometry.h" 17 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
17 18
18 namespace webrtc { 19 namespace webrtc {
19 20
20 class DesktopFrame; 21 class DesktopFrame;
21 22
22 class MouseCursor { 23 class MouseCursor {
23 public: 24 public:
24 MouseCursor(); 25 MouseCursor();
25 26
26 // Takes ownership of |image|. |hotspot| must be within |image| boundaries. 27 // Takes ownership of |image|. |hotspot| must be within |image| boundaries.
27 MouseCursor(DesktopFrame* image, const DesktopVector& hotspot); 28 MouseCursor(DesktopFrame* image, const DesktopVector& hotspot);
28 29
29 ~MouseCursor(); 30 ~MouseCursor();
30 31
31 static MouseCursor* CopyOf(const MouseCursor& cursor); 32 static MouseCursor* CopyOf(const MouseCursor& cursor);
32 33
33 void set_image(DesktopFrame* image) { image_.reset(image); } 34 void set_image(DesktopFrame* image) { image_.reset(image); }
34 const DesktopFrame* image() const { return image_.get(); } 35 const DesktopFrame* image() const { return image_.get(); }
35 36
36 void set_hotspot(const DesktopVector& hotspot ) { hotspot_ = hotspot; } 37 void set_hotspot(const DesktopVector& hotspot ) { hotspot_ = hotspot; }
37 const DesktopVector& hotspot() const { return hotspot_; } 38 const DesktopVector& hotspot() const { return hotspot_; }
38 39
39 private: 40 private:
40 rtc::scoped_ptr<DesktopFrame> image_; 41 std::unique_ptr<DesktopFrame> image_;
41 DesktopVector hotspot_; 42 DesktopVector hotspot_;
42 43
43 RTC_DISALLOW_COPY_AND_ASSIGN(MouseCursor); 44 RTC_DISALLOW_COPY_AND_ASSIGN(MouseCursor);
44 }; 45 };
45 46
46 } // namespace webrtc 47 } // namespace webrtc
47 48
48 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_H_ 49 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_MOUSE_CURSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698