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

Unified Diff: Source/modules/device_orientation/DeviceSensorEventController.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/device_orientation/DeviceSensorEventController.cpp
diff --git a/Source/modules/device_orientation/DeviceSensorEventController.cpp b/Source/modules/device_orientation/DeviceSensorEventController.cpp
index 19a205780fd2baba170596e3f88540a7f4d21237..fda95d867bf38b27b5384e0d07a374741882f077 100644
--- a/Source/modules/device_orientation/DeviceSensorEventController.cpp
+++ b/Source/modules/device_orientation/DeviceSensorEventController.cpp
@@ -33,8 +33,8 @@
namespace WebCore {
-DeviceSensorEventController::DeviceSensorEventController(Document* document)
- : PageLifecycleObserver(document->page())
+DeviceSensorEventController::DeviceSensorEventController(Document& document)
+ : PageLifecycleObserver(document.page())
, m_hasEventListener(false)
, m_document(document)
, m_isActive(false)
@@ -59,10 +59,10 @@ void DeviceSensorEventController::fireDeviceEvent(Timer<DeviceSensorEventControl
void DeviceSensorEventController::dispatchDeviceEvent(PassRefPtr<Event> prpEvent)
{
RefPtr<Event> event = prpEvent;
- if (m_document && m_document->domWindow()
- && !m_document->activeDOMObjectsAreSuspended()
- && !m_document->activeDOMObjectsAreStopped())
- m_document->domWindow()->dispatchEvent(event);
+ if (m_document.domWindow()
+ && !m_document.activeDOMObjectsAreSuspended()
+ && !m_document.activeDOMObjectsAreStopped())
+ m_document.domWindow()->dispatchEvent(event);
if (m_needsCheckingNullEvents) {
if (isNullEvent(event.get()))

Powered by Google App Engine
This is Rietveld 408576698