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

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

Issue 2615713006: Use a new Supplement constructor in DeviceOrientationController's hierarchy (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/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 "modules/device_orientation/DeviceOrientationController.h" 5 #include "modules/device_orientation/DeviceOrientationController.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/Deprecation.h" 8 #include "core/frame/Deprecation.h"
9 #include "core/frame/HostsUsingFeatures.h" 9 #include "core/frame/HostsUsingFeatures.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
11 #include "modules/EventModules.h" 11 #include "modules/EventModules.h"
12 #include "modules/device_orientation/DeviceOrientationData.h" 12 #include "modules/device_orientation/DeviceOrientationData.h"
13 #include "modules/device_orientation/DeviceOrientationDispatcher.h" 13 #include "modules/device_orientation/DeviceOrientationDispatcher.h"
14 #include "modules/device_orientation/DeviceOrientationEvent.h" 14 #include "modules/device_orientation/DeviceOrientationEvent.h"
15 #include "platform/weborigin/SecurityOrigin.h" 15 #include "platform/weborigin/SecurityOrigin.h"
16 #include "public/platform/Platform.h" 16 #include "public/platform/Platform.h"
17 #include "wtf/Assertions.h" 17 #include "wtf/Assertions.h"
18 18
19 namespace blink { 19 namespace blink {
20 20
21 DeviceOrientationController::DeviceOrientationController(Document& document) 21 DeviceOrientationController::DeviceOrientationController(Document& document)
22 : DeviceSingleWindowEventController(document) {} 22 : DeviceSingleWindowEventController(document),
23 Supplement<Document>(document) {}
23 24
24 DeviceOrientationController::~DeviceOrientationController() {} 25 DeviceOrientationController::~DeviceOrientationController() {}
25 26
26 void DeviceOrientationController::didUpdateData() { 27 void DeviceOrientationController::didUpdateData() {
27 if (m_overrideOrientationData) 28 if (m_overrideOrientationData)
28 return; 29 return;
29 dispatchDeviceEvent(lastEvent()); 30 dispatchDeviceEvent(lastEvent());
30 } 31 }
31 32
32 const char* DeviceOrientationController::supplementName() { 33 const char* DeviceOrientationController::supplementName() {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return DeviceOrientationDispatcher::instance(false); 128 return DeviceOrientationDispatcher::instance(false);
128 } 129 }
129 130
130 DEFINE_TRACE(DeviceOrientationController) { 131 DEFINE_TRACE(DeviceOrientationController) {
131 visitor->trace(m_overrideOrientationData); 132 visitor->trace(m_overrideOrientationData);
132 DeviceSingleWindowEventController::trace(visitor); 133 DeviceSingleWindowEventController::trace(visitor);
133 Supplement<Document>::trace(visitor); 134 Supplement<Document>::trace(visitor);
134 } 135 }
135 136
136 } // namespace blink 137 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698