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

Side by Side Diff: remoting/host/desktop_resizer_win.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
« no previous file with comments | « remoting/host/desktop_resizer_ozone.cc ('k') | remoting/host/desktop_resizer_x11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/desktop_resizer.h" 5 #include "remoting/host/desktop_resizer.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8
8 #include <map> 9 #include <map>
9 10
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h"
12 14
13 namespace { 15 namespace {
14 // TODO(jamiewalch): Use the correct DPI for the mode: http://crbug.com/172405. 16 // TODO(jamiewalch): Use the correct DPI for the mode: http://crbug.com/172405.
15 const int kDefaultDPI = 96; 17 const int kDefaultDPI = 96;
16 } // namespace 18 } // namespace
17 19
18 namespace remoting { 20 namespace remoting {
19 21
20 // Provide comparison operation for ScreenResolution so we can use it in 22 // Provide comparison operation for ScreenResolution so we can use it in
21 // std::map. 23 // std::map.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 180 }
179 181
180 // static 182 // static
181 ScreenResolution DesktopResizerWin::GetModeResolution(const DEVMODE& mode) { 183 ScreenResolution DesktopResizerWin::GetModeResolution(const DEVMODE& mode) {
182 DCHECK(IsModeValid(mode)); 184 DCHECK(IsModeValid(mode));
183 return ScreenResolution( 185 return ScreenResolution(
184 webrtc::DesktopSize(mode.dmPelsWidth, mode.dmPelsHeight), 186 webrtc::DesktopSize(mode.dmPelsWidth, mode.dmPelsHeight),
185 webrtc::DesktopVector(kDefaultDPI, kDefaultDPI)); 187 webrtc::DesktopVector(kDefaultDPI, kDefaultDPI));
186 } 188 }
187 189
188 scoped_ptr<DesktopResizer> DesktopResizer::Create() { 190 std::unique_ptr<DesktopResizer> DesktopResizer::Create() {
189 return make_scoped_ptr(new DesktopResizerWin); 191 return base::WrapUnique(new DesktopResizerWin);
190 } 192 }
191 193
192 } // namespace remoting 194 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_resizer_ozone.cc ('k') | remoting/host/desktop_resizer_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698