OLD | NEW |
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 Loading... |
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 |
OLD | NEW |