| 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 DeviceSingleWindowEventController_h | 5 #ifndef DeviceSingleWindowEventController_h |
| 6 #define DeviceSingleWindowEventController_h | 6 #define DeviceSingleWindowEventController_h |
| 7 | 7 |
| 8 #include "core/frame/DOMWindowLifecycleObserver.h" | 8 #include "core/frame/DOMWindowLifecycleObserver.h" |
| 9 #include "core/frame/DeviceEventControllerBase.h" | 9 #include "core/frame/DeviceEventControllerBase.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace WebCore { | 12 namespace WebCore { |
| 13 | 13 |
| 14 class Document; | 14 class Document; |
| 15 class Event; | 15 class Event; |
| 16 | 16 |
| 17 class DeviceSingleWindowEventController : public DeviceEventControllerBase, publ
ic DOMWindowLifecycleObserver { | 17 class DeviceSingleWindowEventController : public DeviceEventControllerBase, publ
ic DOMWindowLifecycleObserver { |
| 18 public: | 18 public: |
| 19 // Inherited from DeviceEventControllerBase. | 19 // Inherited from DeviceEventControllerBase. |
| 20 virtual void didUpdateData() OVERRIDE; | 20 virtual void didUpdateData() OVERRIDE; |
| 21 | 21 |
| 22 // Inherited from DOMWindowLifecycleObserver. | 22 // Inherited from DOMWindowLifecycleObserver. |
| 23 virtual void didAddEventListener(DOMWindow*, const AtomicString&) OVERRIDE; | 23 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) OVERR
IDE; |
| 24 virtual void didRemoveEventListener(DOMWindow*, const AtomicString&) OVERRID
E; | 24 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) OV
ERRIDE; |
| 25 virtual void didRemoveAllEventListeners(DOMWindow*) OVERRIDE; | 25 virtual void didRemoveAllEventListeners(LocalDOMWindow*) OVERRIDE; |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 explicit DeviceSingleWindowEventController(Document&); | 28 explicit DeviceSingleWindowEventController(Document&); |
| 29 virtual ~DeviceSingleWindowEventController(); | 29 virtual ~DeviceSingleWindowEventController(); |
| 30 | 30 |
| 31 void dispatchDeviceEvent(const PassRefPtrWillBeRawPtr<Event>); | 31 void dispatchDeviceEvent(const PassRefPtrWillBeRawPtr<Event>); |
| 32 | 32 |
| 33 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const = 0; | 33 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const = 0; |
| 34 virtual const AtomicString& eventTypeName() const = 0; | 34 virtual const AtomicString& eventTypeName() const = 0; |
| 35 virtual bool isNullEvent(Event*) const = 0; | 35 virtual bool isNullEvent(Event*) const = 0; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 bool m_needsCheckingNullEvents; | 38 bool m_needsCheckingNullEvents; |
| 39 Document& m_document; | 39 Document& m_document; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace WebCore | 42 } // namespace WebCore |
| 43 | 43 |
| 44 #endif // DeviceSingleWindowEventController_h | 44 #endif // DeviceSingleWindowEventController_h |
| OLD | NEW |