| 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
| 31 #include "core/frame/DOMWindow.h" | 31 #include "core/frame/DOMWindow.h" |
| 32 #include "core/page/Page.h" | 32 #include "core/page/Page.h" |
| 33 #include "modules/device_orientation/DeviceMotionData.h" | 33 #include "modules/device_orientation/DeviceMotionData.h" |
| 34 #include "modules/device_orientation/DeviceMotionDispatcher.h" | 34 #include "modules/device_orientation/DeviceMotionDispatcher.h" |
| 35 #include "modules/device_orientation/DeviceMotionEvent.h" | 35 #include "modules/device_orientation/DeviceMotionEvent.h" |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 DeviceMotionController::DeviceMotionController(Document& document) | 39 DeviceMotionController::DeviceMotionController(Document& document) |
| 40 : DeviceSensorEventController(document) | 40 : DeviceSensorEventController(&document) |
| 41 , DOMWindowLifecycleObserver(document.domWindow()) | 41 , DOMWindowLifecycleObserver(document.domWindow()) |
| 42 { | 42 { |
| 43 } | 43 } |
| 44 | 44 |
| 45 DeviceMotionController::~DeviceMotionController() | 45 DeviceMotionController::~DeviceMotionController() |
| 46 { | 46 { |
| 47 stopUpdating(); | 47 stopUpdating(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void DeviceMotionController::didChangeDeviceMotion(DeviceMotionData* deviceMotio
nData) | 50 void DeviceMotionController::didChangeDeviceMotion(DeviceMotionData* deviceMotio
nData) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 m_hasEventListener = false; | 113 m_hasEventListener = false; |
| 114 } | 114 } |
| 115 | 115 |
| 116 void DeviceMotionController::didRemoveAllEventListeners(DOMWindow*) | 116 void DeviceMotionController::didRemoveAllEventListeners(DOMWindow*) |
| 117 { | 117 { |
| 118 stopUpdating(); | 118 stopUpdating(); |
| 119 m_hasEventListener = false; | 119 m_hasEventListener = false; |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace WebCore | 122 } // namespace WebCore |
| OLD | NEW |