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

Side by Side Diff: third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.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
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/DeviceMotionController.h" 5 #include "modules/device_orientation/DeviceMotionController.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/DeviceMotionData.h" 12 #include "modules/device_orientation/DeviceMotionData.h"
13 #include "modules/device_orientation/DeviceMotionDispatcher.h" 13 #include "modules/device_orientation/DeviceMotionDispatcher.h"
14 #include "modules/device_orientation/DeviceMotionEvent.h" 14 #include "modules/device_orientation/DeviceMotionEvent.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 17
18 namespace blink { 18 namespace blink {
19 19
20 DeviceMotionController::DeviceMotionController(Document& document) 20 DeviceMotionController::DeviceMotionController(Document& document)
21 : DeviceSingleWindowEventController(document) {} 21 : DeviceSingleWindowEventController(document),
22 Supplement<Document>(document) {}
22 23
23 DeviceMotionController::~DeviceMotionController() {} 24 DeviceMotionController::~DeviceMotionController() {}
24 25
25 const char* DeviceMotionController::supplementName() { 26 const char* DeviceMotionController::supplementName() {
26 return "DeviceMotionController"; 27 return "DeviceMotionController";
27 } 28 }
28 29
29 DeviceMotionController& DeviceMotionController::from(Document& document) { 30 DeviceMotionController& DeviceMotionController::from(Document& document) {
30 DeviceMotionController* controller = static_cast<DeviceMotionController*>( 31 DeviceMotionController* controller = static_cast<DeviceMotionController*>(
31 Supplement<Document>::from(document, supplementName())); 32 Supplement<Document>::from(document, supplementName()));
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const AtomicString& DeviceMotionController::eventTypeName() const { 93 const AtomicString& DeviceMotionController::eventTypeName() const {
93 return EventTypeNames::devicemotion; 94 return EventTypeNames::devicemotion;
94 } 95 }
95 96
96 DEFINE_TRACE(DeviceMotionController) { 97 DEFINE_TRACE(DeviceMotionController) {
97 DeviceSingleWindowEventController::trace(visitor); 98 DeviceSingleWindowEventController::trace(visitor);
98 Supplement<Document>::trace(visitor); 99 Supplement<Document>::trace(visitor);
99 } 100 }
100 101
101 } // namespace blink 102 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698