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

Side by Side Diff: third_party/WebKit/Source/modules/device_light/DeviceLightController.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 | « no previous file | third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp » ('j') | 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_light/DeviceLightController.h" 5 #include "modules/device_light/DeviceLightController.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "modules/EventModules.h" 8 #include "modules/EventModules.h"
9 #include "modules/device_light/DeviceLightDispatcher.h" 9 #include "modules/device_light/DeviceLightDispatcher.h"
10 #include "modules/device_light/DeviceLightEvent.h" 10 #include "modules/device_light/DeviceLightEvent.h"
11 #include "platform/RuntimeEnabledFeatures.h" 11 #include "platform/RuntimeEnabledFeatures.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 DeviceLightController::DeviceLightController(Document& document) 15 DeviceLightController::DeviceLightController(Document& document)
16 : DeviceSingleWindowEventController(document) {} 16 : DeviceSingleWindowEventController(document),
17 Supplement<Document>(document) {}
17 18
18 DeviceLightController::~DeviceLightController() {} 19 DeviceLightController::~DeviceLightController() {}
19 20
20 const char* DeviceLightController::supplementName() { 21 const char* DeviceLightController::supplementName() {
21 return "DeviceLightController"; 22 return "DeviceLightController";
22 } 23 }
23 24
24 DeviceLightController& DeviceLightController::from(Document& document) { 25 DeviceLightController& DeviceLightController::from(Document& document) {
25 DeviceLightController* controller = static_cast<DeviceLightController*>( 26 DeviceLightController* controller = static_cast<DeviceLightController*>(
26 Supplement<Document>::from(document, supplementName())); 27 Supplement<Document>::from(document, supplementName()));
(...skipping 30 matching lines...) Expand all
57 const AtomicString& DeviceLightController::eventTypeName() const { 58 const AtomicString& DeviceLightController::eventTypeName() const {
58 return EventTypeNames::devicelight; 59 return EventTypeNames::devicelight;
59 } 60 }
60 61
61 DEFINE_TRACE(DeviceLightController) { 62 DEFINE_TRACE(DeviceLightController) {
62 DeviceSingleWindowEventController::trace(visitor); 63 DeviceSingleWindowEventController::trace(visitor);
63 Supplement<Document>::trace(visitor); 64 Supplement<Document>::trace(visitor);
64 } 65 }
65 66
66 } // namespace blink 67 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/device_orientation/DeviceMotionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698