OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Apple Inc. All rights reserved. | 2 * Copyright 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above copyright | 10 * * Redistributions in binary form must reproduce the above copyright |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 #include "core/dom/DocumentSupplementable.h" | 30 #include "core/dom/DocumentSupplementable.h" |
31 #include "core/events/Event.h" | 31 #include "core/events/Event.h" |
32 #include "core/frame/DOMWindowLifecycleObserver.h" | 32 #include "core/frame/DOMWindowLifecycleObserver.h" |
33 #include "modules/device_orientation/DeviceSensorEventController.h" | 33 #include "modules/device_orientation/DeviceSensorEventController.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 class DeviceOrientationData; | 37 class DeviceOrientationData; |
38 | 38 |
39 class DeviceOrientationController : public DeviceSensorEventController, public D
ocumentSupplement, public DOMWindowLifecycleObserver { | 39 class DeviceOrientationController FINAL : public DeviceSensorEventController, pu
blic DocumentSupplement, public DOMWindowLifecycleObserver { |
40 | 40 |
41 public: | 41 public: |
42 virtual ~DeviceOrientationController(); | 42 virtual ~DeviceOrientationController(); |
43 | 43 |
44 static const char* supplementName(); | 44 static const char* supplementName(); |
45 static DeviceOrientationController* from(Document*); | 45 static DeviceOrientationController* from(Document*); |
46 | 46 |
47 void didChangeDeviceOrientation(WebCore::DeviceOrientationData*); | 47 void didChangeDeviceOrientation(WebCore::DeviceOrientationData*); |
48 | 48 |
49 // Inherited from DOMWindowLifecycleObserver | 49 // Inherited from DOMWindowLifecycleObserver |
50 virtual void didAddEventListener(DOMWindow*, const AtomicString&) OVERRIDE; | 50 virtual void didAddEventListener(DOMWindow*, const AtomicString&) OVERRIDE; |
51 virtual void didRemoveEventListener(DOMWindow*, const AtomicString&) OVERRID
E; | 51 virtual void didRemoveEventListener(DOMWindow*, const AtomicString&) OVERRID
E; |
52 virtual void didRemoveAllEventListeners(DOMWindow*) OVERRIDE; | 52 virtual void didRemoveAllEventListeners(DOMWindow*) OVERRIDE; |
53 | 53 |
54 private: | 54 private: |
55 explicit DeviceOrientationController(Document*); | 55 explicit DeviceOrientationController(Document*); |
56 virtual void registerWithDispatcher() OVERRIDE; | 56 virtual void registerWithDispatcher() OVERRIDE; |
57 virtual void unregisterWithDispatcher() OVERRIDE; | 57 virtual void unregisterWithDispatcher() OVERRIDE; |
58 | 58 |
59 virtual bool hasLastData() OVERRIDE; | 59 virtual bool hasLastData() OVERRIDE; |
60 virtual PassRefPtr<Event> getLastEvent() OVERRIDE; | 60 virtual PassRefPtr<Event> getLastEvent() OVERRIDE; |
61 virtual bool isNullEvent(Event*) OVERRIDE; | 61 virtual bool isNullEvent(Event*) OVERRIDE; |
62 }; | 62 }; |
63 | 63 |
64 } // namespace WebCore | 64 } // namespace WebCore |
65 | 65 |
66 #endif // DeviceOrientationController_h | 66 #endif // DeviceOrientationController_h |
OLD | NEW |