Chromium Code Reviews| 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/PlatformEventController.h" | 9 #include "core/frame/PlatformEventController.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class Document; | 14 class Document; |
| 15 class Event; | 15 class Event; |
| 16 | 16 |
| 17 class DeviceSingleWindowEventController : public NoBaseWillBeGarbageCollectedFin alized<DeviceSingleWindowEventController>, public PlatformEventController, publi c DOMWindowLifecycleObserver { | 17 class DeviceSingleWindowEventController : public NoBaseWillBeGarbageCollectedFin alized<DeviceSingleWindowEventController>, public PlatformEventController, publi c DOMWindowLifecycleObserver { |
| 18 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceSingleWindowEventController); | |
|
haraken
2015/03/05 02:20:19
Why can we remove this?
sof
2015/03/05 07:14:58
It's an abstract class with all objects that imple
| |
| 19 public: | 18 public: |
| 20 virtual ~DeviceSingleWindowEventController(); | 19 virtual ~DeviceSingleWindowEventController(); |
| 21 | 20 |
| 22 // Inherited from DeviceEventControllerBase. | 21 // Inherited from DeviceEventControllerBase. |
| 23 virtual void didUpdateData() override; | 22 virtual void didUpdateData() override; |
| 24 DECLARE_VIRTUAL_TRACE(); | 23 DECLARE_VIRTUAL_TRACE(); |
| 25 | 24 |
| 26 // Inherited from DOMWindowLifecycleObserver. | 25 // Inherited from DOMWindowLifecycleObserver. |
| 27 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr ide; | 26 virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) overr ide; |
| 28 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov erride; | 27 virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) ov erride; |
| 29 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override; | 28 virtual void didRemoveAllEventListeners(LocalDOMWindow*) override; |
| 30 | 29 |
| 31 protected: | 30 protected: |
| 31 explicit DeviceSingleWindowEventController(Document&); | |
| 32 | |
| 32 Document& document() const { return *m_document; } | 33 Document& document() const { return *m_document; } |
| 33 | 34 |
| 34 explicit DeviceSingleWindowEventController(Document&); | |
| 35 | |
| 36 void dispatchDeviceEvent(const PassRefPtrWillBeRawPtr<Event>); | 35 void dispatchDeviceEvent(const PassRefPtrWillBeRawPtr<Event>); |
| 37 | 36 |
| 38 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const = 0; | 37 virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const = 0; |
| 39 virtual const AtomicString& eventTypeName() const = 0; | 38 virtual const AtomicString& eventTypeName() const = 0; |
| 40 virtual bool isNullEvent(Event*) const = 0; | 39 virtual bool isNullEvent(Event*) const = 0; |
| 41 | 40 |
| 42 private: | 41 private: |
| 43 bool m_needsCheckingNullEvents; | 42 bool m_needsCheckingNullEvents; |
| 44 RawPtrWillBeMember<Document> m_document; | 43 RawPtrWillBeMember<Document> m_document; |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 } // namespace blink | 46 } // namespace blink |
| 48 | 47 |
| 49 #endif // DeviceSingleWindowEventController_h | 48 #endif // DeviceSingleWindowEventController_h |
| OLD | NEW |