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

Side by Side Diff: Source/modules/device_orientation/DeviceMotionController.cpp

Issue 255983003: Oilpan: Move all supplements of Page, Document, and WorkerClients to the managed heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Apple Inc. All rights reserved. 2 * Copyright 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright 10 * * Redistributions in binary form must reproduce the above copyright
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const char* DeviceMotionController::supplementName() 55 const char* DeviceMotionController::supplementName()
56 { 56 {
57 return "DeviceMotionController"; 57 return "DeviceMotionController";
58 } 58 }
59 59
60 DeviceMotionController& DeviceMotionController::from(Document& document) 60 DeviceMotionController& DeviceMotionController::from(Document& document)
61 { 61 {
62 DeviceMotionController* controller = static_cast<DeviceMotionController*>(Do cumentSupplement::from(document, supplementName())); 62 DeviceMotionController* controller = static_cast<DeviceMotionController*>(Do cumentSupplement::from(document, supplementName()));
63 if (!controller) { 63 if (!controller) {
64 controller = new DeviceMotionController(document); 64 controller = new DeviceMotionController(document);
65 DocumentSupplement::provideTo(document, supplementName(), adoptPtr(contr oller)); 65 DocumentSupplement::provideTo(document, supplementName(), adoptPtrWillBe Noop(controller));
66 } 66 }
67 return *controller; 67 return *controller;
68 } 68 }
69 69
70 bool DeviceMotionController::hasLastData() 70 bool DeviceMotionController::hasLastData()
71 { 71 {
72 return DeviceMotionDispatcher::instance().latestDeviceMotionData(); 72 return DeviceMotionDispatcher::instance().latestDeviceMotionData();
73 } 73 }
74 74
75 PassRefPtrWillBeRawPtr<Event> DeviceMotionController::getLastEvent() 75 PassRefPtrWillBeRawPtr<Event> DeviceMotionController::getLastEvent()
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 m_hasEventListener = false; 113 m_hasEventListener = false;
114 } 114 }
115 115
116 void DeviceMotionController::didRemoveAllEventListeners(DOMWindow*) 116 void DeviceMotionController::didRemoveAllEventListeners(DOMWindow*)
117 { 117 {
118 stopUpdating(); 118 stopUpdating();
119 m_hasEventListener = false; 119 m_hasEventListener = false;
120 } 120 }
121 121
122 } // namespace WebCore 122 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698