Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: Source/modules/device_orientation/DeviceOrientationController.cpp

Issue 1125573003: Update deprecation messages for powerful features on insecure origins (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update -expected.txt Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/modules/device_orientation/DeviceMotionController.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "modules/device_orientation/DeviceOrientationController.h" 6 #include "modules/device_orientation/DeviceOrientationController.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/frame/UseCounter.h" 10 #include "core/frame/UseCounter.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void DeviceOrientationController::didAddEventListener(LocalDOMWindow* window, co nst AtomicString& eventType) 54 void DeviceOrientationController::didAddEventListener(LocalDOMWindow* window, co nst AtomicString& eventType)
55 { 55 {
56 if (eventType != eventTypeName()) 56 if (eventType != eventTypeName())
57 return; 57 return;
58 58
59 if (document().frame()) { 59 if (document().frame()) {
60 String errorMessage; 60 String errorMessage;
61 if (document().isPrivilegedContext(errorMessage)) { 61 if (document().isPrivilegedContext(errorMessage)) {
62 UseCounter::count(document().frame(), UseCounter::DeviceOrientationS ecureOrigin); 62 UseCounter::count(document().frame(), UseCounter::DeviceOrientationS ecureOrigin);
63 } else { 63 } else {
64 UseCounter::countDeprecation(document().frame(), UseCounter::DeviceO rientationInsecureOrigin); 64 UseCounter::count(document().frame(), UseCounter::DeviceOrientationI nsecureOrigin);
65 if (document().frame()->settings()->strictPowerfulFeatureRestriction s()) 65 if (document().frame()->settings()->strictPowerfulFeatureRestriction s())
66 return; 66 return;
67 } 67 }
68 } 68 }
69 69
70 if (!m_hasEventListener) 70 if (!m_hasEventListener)
71 Platform::current()->recordRapporURL("DeviceSensors.DeviceOrientation", WebURL(document().url())); 71 Platform::current()->recordRapporURL("DeviceSensors.DeviceOrientation", WebURL(document().url()));
72 72
73 DeviceSingleWindowEventController::didAddEventListener(window, eventType); 73 DeviceSingleWindowEventController::didAddEventListener(window, eventType);
74 } 74 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 127
128 DEFINE_TRACE(DeviceOrientationController) 128 DEFINE_TRACE(DeviceOrientationController)
129 { 129 {
130 visitor->trace(m_overrideOrientationData); 130 visitor->trace(m_overrideOrientationData);
131 DeviceSingleWindowEventController::trace(visitor); 131 DeviceSingleWindowEventController::trace(visitor);
132 WillBeHeapSupplement<Document>::trace(visitor); 132 WillBeHeapSupplement<Document>::trace(visitor);
133 } 133 }
134 134
135 } // namespace blink 135 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/device_orientation/DeviceMotionController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698