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

Side by Side Diff: remoting/host/resizing_host_observer.h

Issue 628753002: replace OVERRIDE and FINAL with override and final in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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/remoting_me2me_host.cc ('k') | remoting/host/resizing_host_observer_unittest.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 #ifndef REMOTING_HOST_RESIZING_HOST_OBSERVER_H_ 5 #ifndef REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
6 #define REMOTING_HOST_RESIZING_HOST_OBSERVER_H_ 6 #define REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // Uses the specified DesktopResizer to match host desktop size to the client 25 // Uses the specified DesktopResizer to match host desktop size to the client
26 // view size as closely as is possible. When the connection closes, restores 26 // view size as closely as is possible. When the connection closes, restores
27 // the original desktop size. 27 // the original desktop size.
28 class ResizingHostObserver : public ScreenControls { 28 class ResizingHostObserver : public ScreenControls {
29 public: 29 public:
30 explicit ResizingHostObserver(scoped_ptr<DesktopResizer> desktop_resizer); 30 explicit ResizingHostObserver(scoped_ptr<DesktopResizer> desktop_resizer);
31 virtual ~ResizingHostObserver(); 31 virtual ~ResizingHostObserver();
32 32
33 // ScreenControls interface. 33 // ScreenControls interface.
34 virtual void SetScreenResolution(const ScreenResolution& resolution) OVERRIDE; 34 virtual void SetScreenResolution(const ScreenResolution& resolution) override;
35 35
36 // Provide a replacement for base::Time::Now so that this class can be 36 // Provide a replacement for base::Time::Now so that this class can be
37 // unit-tested in a timely manner. This function will be called exactly 37 // unit-tested in a timely manner. This function will be called exactly
38 // once for each call to SetScreenResolution. 38 // once for each call to SetScreenResolution.
39 void SetNowFunctionForTesting( 39 void SetNowFunctionForTesting(
40 const base::Callback<base::Time(void)>& now_function); 40 const base::Callback<base::Time(void)>& now_function);
41 41
42 private: 42 private:
43 scoped_ptr<DesktopResizer> desktop_resizer_; 43 scoped_ptr<DesktopResizer> desktop_resizer_;
44 ScreenResolution original_resolution_; 44 ScreenResolution original_resolution_;
45 45
46 // State to manage rate-limiting of desktop resizes. 46 // State to manage rate-limiting of desktop resizes.
47 base::OneShotTimer<ResizingHostObserver> deferred_resize_timer_; 47 base::OneShotTimer<ResizingHostObserver> deferred_resize_timer_;
48 base::Time previous_resize_time_; 48 base::Time previous_resize_time_;
49 base::Callback<base::Time(void)> now_function_; 49 base::Callback<base::Time(void)> now_function_;
50 50
51 base::WeakPtrFactory<ResizingHostObserver> weak_factory_; 51 base::WeakPtrFactory<ResizingHostObserver> weak_factory_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver); 53 DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver);
54 }; 54 };
55 55
56 } // namespace remoting 56 } // namespace remoting
57 57
58 #endif // REMOTING_HOST_RESIZING_HOST_OBSERVER_H_ 58 #endif // REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/resizing_host_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698