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

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

Issue 1101033002: Update {virtual,override} to follow C++11 style in remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_process_unittest.cc ('k') | remoting/host/desktop_session_win.h » ('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 <map> 7 #include <map>
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 if (a.dimensions().height() != b.dimensions().height()) 25 if (a.dimensions().height() != b.dimensions().height())
26 return a.dimensions().height() < b.dimensions().height(); 26 return a.dimensions().height() < b.dimensions().height();
27 if (a.dpi().x() != b.dpi().x()) 27 if (a.dpi().x() != b.dpi().x())
28 return a.dpi().x() < b.dpi().x(); 28 return a.dpi().x() < b.dpi().x();
29 return a.dpi().y() < b.dpi().y(); 29 return a.dpi().y() < b.dpi().y();
30 } 30 }
31 31
32 class DesktopResizerWin : public DesktopResizer { 32 class DesktopResizerWin : public DesktopResizer {
33 public: 33 public:
34 DesktopResizerWin(); 34 DesktopResizerWin();
35 virtual ~DesktopResizerWin(); 35 ~DesktopResizerWin() override;
36 36
37 // DesktopResizer interface. 37 // DesktopResizer interface.
38 virtual ScreenResolution GetCurrentResolution() override; 38 ScreenResolution GetCurrentResolution() override;
39 virtual std::list<ScreenResolution> GetSupportedResolutions( 39 std::list<ScreenResolution> GetSupportedResolutions(
40 const ScreenResolution& preferred) override; 40 const ScreenResolution& preferred) override;
41 virtual void SetResolution(const ScreenResolution& resolution) override; 41 void SetResolution(const ScreenResolution& resolution) override;
42 virtual void RestoreResolution(const ScreenResolution& original) override; 42 void RestoreResolution(const ScreenResolution& original) override;
43 43
44 private: 44 private:
45 static bool IsResizeSupported(); 45 static bool IsResizeSupported();
46 46
47 // Calls EnumDisplaySettingsEx() for the primary monitor. 47 // Calls EnumDisplaySettingsEx() for the primary monitor.
48 // Returns false if |mode_number| does not exist. 48 // Returns false if |mode_number| does not exist.
49 static bool GetPrimaryDisplayMode( 49 static bool GetPrimaryDisplayMode(
50 DWORD mode_number, DWORD flags, DEVMODE* mode); 50 DWORD mode_number, DWORD flags, DEVMODE* mode);
51 51
52 // Returns true if the mode has width, height, bits-per-pixel, frequency 52 // Returns true if the mode has width, height, bits-per-pixel, frequency
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 return ScreenResolution( 182 return ScreenResolution(
183 webrtc::DesktopSize(mode.dmPelsWidth, mode.dmPelsHeight), 183 webrtc::DesktopSize(mode.dmPelsWidth, mode.dmPelsHeight),
184 webrtc::DesktopVector(kDefaultDPI, kDefaultDPI)); 184 webrtc::DesktopVector(kDefaultDPI, kDefaultDPI));
185 } 185 }
186 186
187 scoped_ptr<DesktopResizer> DesktopResizer::Create() { 187 scoped_ptr<DesktopResizer> DesktopResizer::Create() {
188 return make_scoped_ptr(new DesktopResizerWin); 188 return make_scoped_ptr(new DesktopResizerWin);
189 } 189 }
190 190
191 } // namespace remoting 191 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/host/desktop_session_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698