| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h" | 5 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "modules/device_orientation/DeviceOrientationDispatcher.h" | 9 #include "modules/device_orientation/DeviceOrientationDispatcher.h" |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 if (document().frame()) { | 44 if (document().frame()) { |
| 45 if (document().isSecureContext()) { | 45 if (document().isSecureContext()) { |
| 46 UseCounter::count(document().frame(), | 46 UseCounter::count(document().frame(), |
| 47 UseCounter::DeviceOrientationAbsoluteSecureOrigin); | 47 UseCounter::DeviceOrientationAbsoluteSecureOrigin); |
| 48 } else { | 48 } else { |
| 49 Deprecation::countDeprecation( | 49 Deprecation::countDeprecation( |
| 50 document().frame(), | 50 document().frame(), |
| 51 UseCounter::DeviceOrientationAbsoluteInsecureOrigin); | 51 UseCounter::DeviceOrientationAbsoluteInsecureOrigin); |
| 52 // TODO: add rappor logging of insecure origins as in | 52 // TODO: add rappor logging of insecure origins as in |
| 53 // DeviceOrientationController. | 53 // DeviceOrientationController. |
| 54 if (document().frame()->settings()->strictPowerfulFeatureRestrictions()) | 54 if (document() |
| 55 .frame() |
| 56 ->settings() |
| 57 ->getStrictPowerfulFeatureRestrictions()) |
| 55 return; | 58 return; |
| 56 } | 59 } |
| 57 } | 60 } |
| 58 | 61 |
| 59 // TODO: add rappor url logging as in DeviceOrientationController. | 62 // TODO: add rappor url logging as in DeviceOrientationController. |
| 60 | 63 |
| 61 DeviceSingleWindowEventController::didAddEventListener(window, eventType); | 64 DeviceSingleWindowEventController::didAddEventListener(window, eventType); |
| 62 } | 65 } |
| 63 | 66 |
| 64 DeviceOrientationDispatcher& | 67 DeviceOrientationDispatcher& |
| 65 DeviceOrientationAbsoluteController::dispatcherInstance() const { | 68 DeviceOrientationAbsoluteController::dispatcherInstance() const { |
| 66 return DeviceOrientationDispatcher::instance(true); | 69 return DeviceOrientationDispatcher::instance(true); |
| 67 } | 70 } |
| 68 | 71 |
| 69 const AtomicString& DeviceOrientationAbsoluteController::eventTypeName() const { | 72 const AtomicString& DeviceOrientationAbsoluteController::eventTypeName() const { |
| 70 return EventTypeNames::deviceorientationabsolute; | 73 return EventTypeNames::deviceorientationabsolute; |
| 71 } | 74 } |
| 72 | 75 |
| 73 DEFINE_TRACE(DeviceOrientationAbsoluteController) { | 76 DEFINE_TRACE(DeviceOrientationAbsoluteController) { |
| 74 DeviceOrientationController::trace(visitor); | 77 DeviceOrientationController::trace(visitor); |
| 75 } | 78 } |
| 76 | 79 |
| 77 } // namespace blink | 80 } // namespace blink |
| OLD | NEW |