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

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

Issue 667123002: Standardize usage of virtual/override/final in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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.h ('k') | remoting/host/desktop_session_agent.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 <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
11 #include "base/mac/mac_util.h" 11 #include "base/mac/mac_util.h"
12 #include "base/mac/scoped_cftyperef.h" 12 #include "base/mac/scoped_cftyperef.h"
13 #include "remoting/base/logging.h" 13 #include "remoting/base/logging.h"
14 14
15 namespace { 15 namespace {
16 // 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.
17 const int kDefaultDPI = 96; 17 const int kDefaultDPI = 96;
18 } // namespace 18 } // namespace
19 19
20 namespace remoting { 20 namespace remoting {
21 21
22 class DesktopResizerMac : public DesktopResizer { 22 class DesktopResizerMac : public DesktopResizer {
23 public: 23 public:
24 DesktopResizerMac(); 24 DesktopResizerMac();
25 25
26 // DesktopResizer interface 26 // DesktopResizer interface
27 virtual ScreenResolution GetCurrentResolution() override; 27 ScreenResolution GetCurrentResolution() override;
28 virtual std::list<ScreenResolution> GetSupportedResolutions( 28 std::list<ScreenResolution> GetSupportedResolutions(
29 const ScreenResolution& preferred) override; 29 const ScreenResolution& preferred) override;
30 virtual void SetResolution(const ScreenResolution& resolution) override; 30 void SetResolution(const ScreenResolution& resolution) override;
31 virtual void RestoreResolution(const ScreenResolution& original) override; 31 void RestoreResolution(const ScreenResolution& original) override;
32 32
33 private: 33 private:
34 // If there is a single display, get its id and return true, otherwise return 34 // If there is a single display, get its id and return true, otherwise return
35 // false. We don't currently support resize-to-client on multi-monitor Macs. 35 // false. We don't currently support resize-to-client on multi-monitor Macs.
36 bool GetSoleDisplayId(CGDirectDisplayID* display); 36 bool GetSoleDisplayId(CGDirectDisplayID* display);
37 37
38 void GetSupportedModesAndResolutions( 38 void GetSupportedModesAndResolutions(
39 base::ScopedCFTypeRef<CFMutableArrayRef>* modes, 39 base::ScopedCFTypeRef<CFMutableArrayRef>* modes,
40 std::list<ScreenResolution>* resolutions); 40 std::list<ScreenResolution>* resolutions);
41 41
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 *display = displays[0]; 165 *display = displays[0];
166 return true; 166 return true;
167 } 167 }
168 168
169 scoped_ptr<DesktopResizer> DesktopResizer::Create() { 169 scoped_ptr<DesktopResizer> DesktopResizer::Create() {
170 return make_scoped_ptr(new DesktopResizerMac); 170 return make_scoped_ptr(new DesktopResizerMac);
171 } 171 }
172 172
173 } // namespace remoting 173 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process.h ('k') | remoting/host/desktop_session_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698