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

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

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 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
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 26 matching lines...) Expand all
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 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/oauth_token_getter_impl.cc ('k') | remoting/host/setup/me2me_native_messaging_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698