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

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

Issue 1846913009: HeapSupplements are now just Supplements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/DeviceOrientationAbsoluteController.h" 5 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "modules/device_orientation/DeviceOrientationDispatcher.h" 9 #include "modules/device_orientation/DeviceOrientationDispatcher.h"
10 10
(...skipping 11 matching lines...) Expand all
22 #endif 22 #endif
23 } 23 }
24 24
25 const char* DeviceOrientationAbsoluteController::supplementName() 25 const char* DeviceOrientationAbsoluteController::supplementName()
26 { 26 {
27 return "DeviceOrientationAbsoluteController"; 27 return "DeviceOrientationAbsoluteController";
28 } 28 }
29 29
30 DeviceOrientationAbsoluteController& DeviceOrientationAbsoluteController::from(D ocument& document) 30 DeviceOrientationAbsoluteController& DeviceOrientationAbsoluteController::from(D ocument& document)
31 { 31 {
32 DeviceOrientationAbsoluteController* controller = static_cast<DeviceOrientat ionAbsoluteController*>(HeapSupplement<Document>::from(document, DeviceOrientati onAbsoluteController::supplementName())); 32 DeviceOrientationAbsoluteController* controller = static_cast<DeviceOrientat ionAbsoluteController*>(Supplement<Document>::from(document, DeviceOrientationAb soluteController::supplementName()));
33 if (!controller) { 33 if (!controller) {
34 controller = new DeviceOrientationAbsoluteController(document); 34 controller = new DeviceOrientationAbsoluteController(document);
35 HeapSupplement<Document>::provideTo(document, DeviceOrientationAbsoluteC ontroller::supplementName(), controller); 35 Supplement<Document>::provideTo(document, DeviceOrientationAbsoluteContr oller::supplementName(), controller);
36 } 36 }
37 return *controller; 37 return *controller;
38 } 38 }
39 39
40 void DeviceOrientationAbsoluteController::didAddEventListener(LocalDOMWindow* wi ndow, const AtomicString& eventType) 40 void DeviceOrientationAbsoluteController::didAddEventListener(LocalDOMWindow* wi ndow, const AtomicString& eventType)
41 { 41 {
42 if (eventType != eventTypeName()) 42 if (eventType != eventTypeName())
43 return; 43 return;
44 44
45 if (document().frame()) { 45 if (document().frame()) {
(...skipping 22 matching lines...) Expand all
68 { 68 {
69 return EventTypeNames::deviceorientationabsolute; 69 return EventTypeNames::deviceorientationabsolute;
70 } 70 }
71 71
72 DEFINE_TRACE(DeviceOrientationAbsoluteController) 72 DEFINE_TRACE(DeviceOrientationAbsoluteController)
73 { 73 {
74 DeviceOrientationController::trace(visitor); 74 DeviceOrientationController::trace(visitor);
75 } 75 }
76 76
77 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698