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

Side by Side Diff: webrtc/modules/desktop_capture/desktop_frame_win.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_DESKTOP_FRAME_WIN_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
13 13
14 #include <memory>
15
14 #include <windows.h> 16 #include <windows.h>
15 17
16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/modules/desktop_capture/desktop_frame.h" 18 #include "webrtc/modules/desktop_capture/desktop_frame.h"
18 #include "webrtc/typedefs.h" 19 #include "webrtc/typedefs.h"
19 20
20 namespace webrtc { 21 namespace webrtc {
21 22
22 // DesktopFrame implementation used by screen and window captures on Windows. 23 // DesktopFrame implementation used by screen and window captures on Windows.
23 // Frame data is stored in a GDI bitmap. 24 // Frame data is stored in a GDI bitmap.
24 class DesktopFrameWin : public DesktopFrame { 25 class DesktopFrameWin : public DesktopFrame {
25 public: 26 public:
26 virtual ~DesktopFrameWin(); 27 virtual ~DesktopFrameWin();
27 static DesktopFrameWin* Create(DesktopSize size, 28 static DesktopFrameWin* Create(DesktopSize size,
28 SharedMemoryFactory* shared_memory_factory, 29 SharedMemoryFactory* shared_memory_factory,
29 HDC hdc); 30 HDC hdc);
30 31
31 HBITMAP bitmap() { return bitmap_; } 32 HBITMAP bitmap() { return bitmap_; }
32 33
33 private: 34 private:
34 DesktopFrameWin(DesktopSize size, 35 DesktopFrameWin(DesktopSize size,
35 int stride, 36 int stride,
36 uint8_t* data, 37 uint8_t* data,
37 rtc::scoped_ptr<SharedMemory> shared_memory, 38 std::unique_ptr<SharedMemory> shared_memory,
38 HBITMAP bitmap); 39 HBITMAP bitmap);
39 40
40 HBITMAP bitmap_; 41 HBITMAP bitmap_;
41 rtc::scoped_ptr<SharedMemory> owned_shared_memory_; 42 std::unique_ptr<SharedMemory> owned_shared_memory_;
42 43
43 RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin); 44 RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin);
44 }; 45 };
45 46
46 } // namespace webrtc 47 } // namespace webrtc
47 48
48 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_ 49 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
49 50
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698