OLD | NEW |
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 CHROME_BROWSER_EXTENSIONS_API_IDLE_IDLE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDLE_IDLE_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_IDLE_IDLE_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDLE_IDLE_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void StopPolling(); | 119 void StopPolling(); |
120 void UpdateIdleState(); | 120 void UpdateIdleState(); |
121 void UpdateIdleStateCallback(int idle_time); | 121 void UpdateIdleStateCallback(int idle_time); |
122 | 122 |
123 Profile* profile_; | 123 Profile* profile_; |
124 | 124 |
125 IdleState last_state_; | 125 IdleState last_state_; |
126 MonitorMap monitors_; | 126 MonitorMap monitors_; |
127 | 127 |
128 base::RepeatingTimer<IdleManager> poll_timer_; | 128 base::RepeatingTimer<IdleManager> poll_timer_; |
129 base::WeakPtrFactory<IdleManager> weak_factory_; | |
130 | 129 |
131 scoped_ptr<IdleTimeProvider> idle_time_provider_; | 130 scoped_ptr<IdleTimeProvider> idle_time_provider_; |
132 scoped_ptr<EventDelegate> event_delegate_; | 131 scoped_ptr<EventDelegate> event_delegate_; |
133 | 132 |
134 base::ThreadChecker thread_checker_; | 133 base::ThreadChecker thread_checker_; |
135 | 134 |
136 // Listen to extension unloaded notification. | 135 // Listen to extension unloaded notification. |
137 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 136 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
138 extension_registry_observer_; | 137 extension_registry_observer_; |
139 | 138 |
| 139 base::WeakPtrFactory<IdleManager> weak_factory_; |
| 140 |
140 DISALLOW_COPY_AND_ASSIGN(IdleManager); | 141 DISALLOW_COPY_AND_ASSIGN(IdleManager); |
141 }; | 142 }; |
142 | 143 |
143 } // namespace extensions | 144 } // namespace extensions |
144 | 145 |
145 #endif // CHROME_BROWSER_EXTENSIONS_API_IDLE_IDLE_MANAGER_H_ | 146 #endif // CHROME_BROWSER_EXTENSIONS_API_IDLE_IDLE_MANAGER_H_ |
OLD | NEW |