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

Side by Side Diff: chrome/browser/chromeos/idle_detector.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_IDLE_DETECTOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_IDLE_DETECTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_IDLE_DETECTOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_IDLE_DETECTOR_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 10 matching lines...) Expand all
21 21
22 void Start(const base::TimeDelta& timeout); 22 void Start(const base::TimeDelta& timeout);
23 23
24 private: 24 private:
25 // ui::UserActivityObserver overrides: 25 // ui::UserActivityObserver overrides:
26 void OnUserActivity(const ui::Event* event) override; 26 void OnUserActivity(const ui::Event* event) override;
27 27
28 // Resets |timer_| to fire when we reach our idle timeout. 28 // Resets |timer_| to fire when we reach our idle timeout.
29 void ResetTimer(); 29 void ResetTimer();
30 30
31 base::OneShotTimer<IdleDetector> timer_; 31 base::OneShotTimer timer_;
32 32
33 base::Closure idle_callback_; 33 base::Closure idle_callback_;
34 34
35 base::TimeDelta timeout_; 35 base::TimeDelta timeout_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(IdleDetector); 37 DISALLOW_COPY_AND_ASSIGN(IdleDetector);
38 }; 38 };
39 39
40 } // namespace chromeos 40 } // namespace chromeos
41 41
42 #endif // CHROME_BROWSER_CHROMEOS_IDLE_DETECTOR_H_ 42 #endif // CHROME_BROWSER_CHROMEOS_IDLE_DETECTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/first_run/drive_first_run_controller.h ('k') | chrome/browser/chromeos/login/app_launch_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698