| OLD | NEW |
| 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 DeviceEventControllerBase_h | 5 #ifndef DeviceEventControllerBase_h |
| 6 #define DeviceEventControllerBase_h | 6 #define DeviceEventControllerBase_h |
| 7 | 7 |
| 8 #include "core/page/PageLifecycleObserver.h" | 8 #include "core/page/PageLifecycleObserver.h" |
| 9 #include "platform/Timer.h" | 9 #include "platform/Timer.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 virtual void registerWithDispatcher() = 0; | 29 virtual void registerWithDispatcher() = 0; |
| 30 virtual void unregisterWithDispatcher() = 0; | 30 virtual void unregisterWithDispatcher() = 0; |
| 31 | 31 |
| 32 // When true initiates a one-shot didUpdateData() when startUpdating() is ca
lled. | 32 // When true initiates a one-shot didUpdateData() when startUpdating() is ca
lled. |
| 33 virtual bool hasLastData() = 0; | 33 virtual bool hasLastData() = 0; |
| 34 | 34 |
| 35 bool m_hasEventListener; | 35 bool m_hasEventListener; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 // Inherited from PageLifecycleObserver. | 38 // Inherited from PageLifecycleObserver. |
| 39 virtual void pageVisibilityChanged() OVERRIDE; | 39 virtual void pageVisibilityChanged() OVERRIDE FINAL; |
| 40 | 40 |
| 41 void oneShotCallback(Timer<DeviceEventControllerBase>*); | 41 void oneShotCallback(Timer<DeviceEventControllerBase>*); |
| 42 | 42 |
| 43 bool m_isActive; | 43 bool m_isActive; |
| 44 Timer<DeviceEventControllerBase> m_timer; | 44 Timer<DeviceEventControllerBase> m_timer; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 } // namespace WebCore | 47 } // namespace WebCore |
| 48 | 48 |
| 49 #endif // DeviceEventControllerBase_h | 49 #endif // DeviceEventControllerBase_h |
| OLD | NEW |