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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 if (document().frame()) { | 44 if (document().frame()) { |
45 String errorMessage; | 45 String errorMessage; |
46 if (document().isSecureContext(errorMessage)) { | 46 if (document().isSecureContext(errorMessage)) { |
47 UseCounter::count(document().frame(), | 47 UseCounter::count(document().frame(), |
48 UseCounter::DeviceOrientationAbsoluteSecureOrigin); | 48 UseCounter::DeviceOrientationAbsoluteSecureOrigin); |
49 } else { | 49 } else { |
50 Deprecation::countDeprecation( | 50 Deprecation::countDeprecation( |
51 document().frame(), | 51 document().frame(), |
52 UseCounter::DeviceOrientationAbsoluteInsecureOrigin); | 52 UseCounter::DeviceOrientationAbsoluteInsecureOrigin); |
53 // TODO: add rappor logging of insecure origins as in DeviceOrientationCon
troller. | 53 // TODO: add rappor logging of insecure origins as in |
| 54 // DeviceOrientationController. |
54 if (document().frame()->settings()->strictPowerfulFeatureRestrictions()) | 55 if (document().frame()->settings()->strictPowerfulFeatureRestrictions()) |
55 return; | 56 return; |
56 } | 57 } |
57 } | 58 } |
58 | 59 |
59 // TODO: add rappor url logging as in DeviceOrientationController. | 60 // TODO: add rappor url logging as in DeviceOrientationController. |
60 | 61 |
61 DeviceSingleWindowEventController::didAddEventListener(window, eventType); | 62 DeviceSingleWindowEventController::didAddEventListener(window, eventType); |
62 } | 63 } |
63 | 64 |
64 DeviceOrientationDispatcher& | 65 DeviceOrientationDispatcher& |
65 DeviceOrientationAbsoluteController::dispatcherInstance() const { | 66 DeviceOrientationAbsoluteController::dispatcherInstance() const { |
66 return DeviceOrientationDispatcher::instance(true); | 67 return DeviceOrientationDispatcher::instance(true); |
67 } | 68 } |
68 | 69 |
69 const AtomicString& DeviceOrientationAbsoluteController::eventTypeName() const { | 70 const AtomicString& DeviceOrientationAbsoluteController::eventTypeName() const { |
70 return EventTypeNames::deviceorientationabsolute; | 71 return EventTypeNames::deviceorientationabsolute; |
71 } | 72 } |
72 | 73 |
73 DEFINE_TRACE(DeviceOrientationAbsoluteController) { | 74 DEFINE_TRACE(DeviceOrientationAbsoluteController) { |
74 DeviceOrientationController::trace(visitor); | 75 DeviceOrientationController::trace(visitor); |
75 } | 76 } |
76 | 77 |
77 } // namespace blink | 78 } // namespace blink |
OLD | NEW |