| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 DeviceOrientationData* DeviceOrientationController::lastData() | 72 DeviceOrientationData* DeviceOrientationController::lastData() |
| 73 { | 73 { |
| 74 return m_overrideOrientationData ? m_overrideOrientationData.get() : DeviceO
rientationDispatcher::instance().latestDeviceOrientationData(); | 74 return m_overrideOrientationData ? m_overrideOrientationData.get() : DeviceO
rientationDispatcher::instance().latestDeviceOrientationData(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool DeviceOrientationController::hasLastData() | 77 bool DeviceOrientationController::hasLastData() |
| 78 { | 78 { |
| 79 return lastData(); | 79 return lastData(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 PassRefPtr<Event> DeviceOrientationController::getLastEvent() | 82 PassRefPtrWillBeRawPtr<Event> DeviceOrientationController::getLastEvent() |
| 83 { | 83 { |
| 84 return DeviceOrientationEvent::create(EventTypeNames::deviceorientation, las
tData()); | 84 return DeviceOrientationEvent::create(EventTypeNames::deviceorientation, las
tData()); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void DeviceOrientationController::registerWithDispatcher() | 87 void DeviceOrientationController::registerWithDispatcher() |
| 88 { | 88 { |
| 89 DeviceOrientationDispatcher::instance().addDeviceOrientationController(this)
; | 89 DeviceOrientationDispatcher::instance().addDeviceOrientationController(this)
; |
| 90 } | 90 } |
| 91 | 91 |
| 92 void DeviceOrientationController::unregisterWithDispatcher() | 92 void DeviceOrientationController::unregisterWithDispatcher() |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 { | 134 { |
| 135 if (!m_overrideOrientationData) | 135 if (!m_overrideOrientationData) |
| 136 return; | 136 return; |
| 137 m_overrideOrientationData.clear(); | 137 m_overrideOrientationData.clear(); |
| 138 DeviceOrientationData* orientation = lastData(); | 138 DeviceOrientationData* orientation = lastData(); |
| 139 if (orientation) | 139 if (orientation) |
| 140 didChangeDeviceOrientation(orientation); | 140 didChangeDeviceOrientation(orientation); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace WebCore | 143 } // namespace WebCore |
| OLD | NEW |