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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 DocumentSupplement::provideTo(document, supplementName(), adoptPtr(contr
oller)); | 65 DocumentSupplement::provideTo(document, supplementName(), adoptPtr(contr
oller)); |
66 } | 66 } |
67 return *controller; | 67 return *controller; |
68 } | 68 } |
69 | 69 |
70 bool DeviceMotionController::hasLastData() | 70 bool DeviceMotionController::hasLastData() |
71 { | 71 { |
72 return DeviceMotionDispatcher::instance().latestDeviceMotionData(); | 72 return DeviceMotionDispatcher::instance().latestDeviceMotionData(); |
73 } | 73 } |
74 | 74 |
75 PassRefPtr<Event> DeviceMotionController::getLastEvent() | 75 PassRefPtrWillBeRawPtr<Event> DeviceMotionController::getLastEvent() |
76 { | 76 { |
77 return DeviceMotionEvent::create(EventTypeNames::devicemotion, DeviceMotionD
ispatcher::instance().latestDeviceMotionData()); | 77 return DeviceMotionEvent::create(EventTypeNames::devicemotion, DeviceMotionD
ispatcher::instance().latestDeviceMotionData()); |
78 } | 78 } |
79 | 79 |
80 void DeviceMotionController::registerWithDispatcher() | 80 void DeviceMotionController::registerWithDispatcher() |
81 { | 81 { |
82 DeviceMotionDispatcher::instance().addDeviceMotionController(this); | 82 DeviceMotionDispatcher::instance().addDeviceMotionController(this); |
83 } | 83 } |
84 | 84 |
85 void DeviceMotionController::unregisterWithDispatcher() | 85 void DeviceMotionController::unregisterWithDispatcher() |
(...skipping 24 matching lines...) Expand all Loading... |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 void DeviceMotionController::didRemoveAllEventListeners(DOMWindow*) | 113 void DeviceMotionController::didRemoveAllEventListeners(DOMWindow*) |
114 { | 114 { |
115 stopUpdating(); | 115 stopUpdating(); |
116 m_hasEventListener = false; | 116 m_hasEventListener = false; |
117 } | 117 } |
118 | 118 |
119 } // namespace WebCore | 119 } // namespace WebCore |
OLD | NEW |