| 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 EXTENSIONS_BROWSER_API_IDLE_IDLE_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_IDLE_IDLE_MANAGER_H_ |
| 6 #define EXTENSIONS_BROWSER_API_IDLE_IDLE_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_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 StartPolling(); | 119 void StartPolling(); |
| 120 void StopPolling(); | 120 void StopPolling(); |
| 121 void UpdateIdleState(); | 121 void UpdateIdleState(); |
| 122 void UpdateIdleStateCallback(int idle_time); | 122 void UpdateIdleStateCallback(int idle_time); |
| 123 | 123 |
| 124 content::BrowserContext* const context_; | 124 content::BrowserContext* const context_; |
| 125 | 125 |
| 126 ui::IdleState last_state_; | 126 ui::IdleState last_state_; |
| 127 MonitorMap monitors_; | 127 MonitorMap monitors_; |
| 128 | 128 |
| 129 base::RepeatingTimer<IdleManager> poll_timer_; | 129 base::RepeatingTimer poll_timer_; |
| 130 | 130 |
| 131 scoped_ptr<IdleTimeProvider> idle_time_provider_; | 131 scoped_ptr<IdleTimeProvider> idle_time_provider_; |
| 132 scoped_ptr<EventDelegate> event_delegate_; | 132 scoped_ptr<EventDelegate> event_delegate_; |
| 133 | 133 |
| 134 base::ThreadChecker thread_checker_; | 134 base::ThreadChecker thread_checker_; |
| 135 | 135 |
| 136 // Listen to extension unloaded notification. | 136 // Listen to extension unloaded notification. |
| 137 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 137 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 138 extension_registry_observer_; | 138 extension_registry_observer_; |
| 139 | 139 |
| 140 base::WeakPtrFactory<IdleManager> weak_factory_; | 140 base::WeakPtrFactory<IdleManager> weak_factory_; |
| 141 | 141 |
| 142 DISALLOW_COPY_AND_ASSIGN(IdleManager); | 142 DISALLOW_COPY_AND_ASSIGN(IdleManager); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace extensions | 145 } // namespace extensions |
| 146 | 146 |
| 147 #endif // EXTENSIONS_BROWSER_API_IDLE_IDLE_MANAGER_H_ | 147 #endif // EXTENSIONS_BROWSER_API_IDLE_IDLE_MANAGER_H_ |
| OLD | NEW |