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

Side by Side Diff: webrtc/modules/desktop_capture/screen_capturer_win.cc

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 #include "webrtc/modules/desktop_capture/screen_capturer.h" 11 #include "webrtc/modules/desktop_capture/screen_capturer.h"
12 12
13 #include <memory>
13 #include <utility> 14 #include <utility>
14 15
15 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" 16 #include "webrtc/modules/desktop_capture/desktop_capture_options.h"
16 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h" 17 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h"
17 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h" 18 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h"
18 19
19 namespace webrtc { 20 namespace webrtc {
20 21
21 // static 22 // static
22 ScreenCapturer* ScreenCapturer::Create(const DesktopCaptureOptions& options) { 23 ScreenCapturer* ScreenCapturer::Create(const DesktopCaptureOptions& options) {
23 rtc::scoped_ptr<ScreenCapturer> gdi_capturer( 24 std::unique_ptr<ScreenCapturer> gdi_capturer(
24 new ScreenCapturerWinGdi(options)); 25 new ScreenCapturerWinGdi(options));
25 26
26 if (options.allow_use_magnification_api()) 27 if (options.allow_use_magnification_api())
27 return new ScreenCapturerWinMagnifier(std::move(gdi_capturer)); 28 return new ScreenCapturerWinMagnifier(std::move(gdi_capturer));
28 29
29 return gdi_capturer.release(); 30 return gdi_capturer.release();
30 } 31 }
31 32
32 } // namespace webrtc 33 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698