OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_VIEWS_REPEAT_CONTROLLER_H_ | 5 #ifndef UI_VIEWS_REPEAT_CONTROLLER_H_ |
6 #define UI_VIEWS_REPEAT_CONTROLLER_H_ | 6 #define UI_VIEWS_REPEAT_CONTROLLER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 void Start(); | 30 void Start(); |
31 | 31 |
32 // Stop repeating. | 32 // Stop repeating. |
33 void Stop(); | 33 void Stop(); |
34 | 34 |
35 private: | 35 private: |
36 // Called when the timer expires. | 36 // Called when the timer expires. |
37 void Run(); | 37 void Run(); |
38 | 38 |
39 // The current timer. | 39 // The current timer. |
40 base::OneShotTimer<RepeatController> timer_; | 40 base::OneShotTimer timer_; |
41 | 41 |
42 base::Closure callback_; | 42 base::Closure callback_; |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(RepeatController); | 44 DISALLOW_COPY_AND_ASSIGN(RepeatController); |
45 }; | 45 }; |
46 | 46 |
47 } // namespace views | 47 } // namespace views |
48 | 48 |
49 #endif // UI_VIEWS_REPEAT_CONTROLLER_H_ | 49 #endif // UI_VIEWS_REPEAT_CONTROLLER_H_ |
OLD | NEW |