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

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h

Issue 1921233002: Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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_WIN_SCREEN_CAPTURER_WIN_GDI_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include "webrtc/modules/desktop_capture/screen_capturer.h" 16 #include "webrtc/modules/desktop_capture/screen_capturer.h"
17 17
18 #include <windows.h> 18 #include <windows.h>
19 19
20 #include "webrtc/base/constructormagic.h" 20 #include "webrtc/base/constructormagic.h"
21 #include "webrtc/base/scoped_ptr.h"
22 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" 21 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
23 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" 22 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
24 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" 23 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
25 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" 24 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h"
26 25
27 namespace webrtc { 26 namespace webrtc {
28 27
29 class Differ; 28 class Differ;
30 29
31 // ScreenCapturerWinGdi captures 32bit RGB using GDI. 30 // ScreenCapturerWinGdi captures 32bit RGB using GDI.
32 // 31 //
33 // ScreenCapturerWinGdi is double-buffered as required by ScreenCapturer. 32 // ScreenCapturerWinGdi is double-buffered as required by ScreenCapturer.
34 class ScreenCapturerWinGdi : public ScreenCapturer { 33 class ScreenCapturerWinGdi : public ScreenCapturer {
35 public: 34 public:
36 explicit ScreenCapturerWinGdi(const DesktopCaptureOptions& options); 35 explicit ScreenCapturerWinGdi(const DesktopCaptureOptions& options);
37 virtual ~ScreenCapturerWinGdi(); 36 virtual ~ScreenCapturerWinGdi();
38 37
39 // Overridden from ScreenCapturer: 38 // Overridden from ScreenCapturer:
40 void Start(Callback* callback) override; 39 void Start(Callback* callback) override;
41 void SetSharedMemoryFactory( 40 void SetSharedMemoryFactory(
42 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) override; 41 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) override;
43 void Capture(const DesktopRegion& region) override; 42 void Capture(const DesktopRegion& region) override;
44 bool GetScreenList(ScreenList* screens) override; 43 bool GetScreenList(ScreenList* screens) override;
45 bool SelectScreen(ScreenId id) override; 44 bool SelectScreen(ScreenId id) override;
46 45
47 private: 46 private:
48 typedef HRESULT (WINAPI * DwmEnableCompositionFunc)(UINT); 47 typedef HRESULT (WINAPI * DwmEnableCompositionFunc)(UINT);
49 48
50 // Make sure that the device contexts match the screen configuration. 49 // Make sure that the device contexts match the screen configuration.
51 void PrepareCaptureResources(); 50 void PrepareCaptureResources();
52 51
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 86
88 // Used to suppress duplicate logging of SetThreadExecutionState errors. 87 // Used to suppress duplicate logging of SetThreadExecutionState errors.
89 bool set_thread_execution_state_failed_; 88 bool set_thread_execution_state_failed_;
90 89
91 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinGdi); 90 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinGdi);
92 }; 91 };
93 92
94 } // namespace webrtc 93 } // namespace webrtc
95 94
96 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_ 95 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_GDI_H_
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/shared_memory.h ('k') | webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698