| 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 "core/frame/DeviceSingleWindowEventController.h" | 5 #include "core/frame/DeviceSingleWindowEventController.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/events/Event.h" | 8 #include "core/events/Event.h" |
| 9 #include "core/page/Page.h" | 9 #include "core/page/Page.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 DeviceSingleWindowEventController::DeviceSingleWindowEventController( | 13 DeviceSingleWindowEventController::DeviceSingleWindowEventController( |
| 14 Document& document) | 14 Document& document) |
| 15 : PlatformEventController(document.page()), | 15 : PlatformEventController(document.frame()), |
| 16 m_needsCheckingNullEvents(true), | 16 m_needsCheckingNullEvents(true), |
| 17 m_document(document) { | 17 m_document(document) { |
| 18 document.domWindow()->registerEventListenerObserver(this); | 18 document.domWindow()->registerEventListenerObserver(this); |
| 19 } | 19 } |
| 20 | 20 |
| 21 DeviceSingleWindowEventController::~DeviceSingleWindowEventController() {} | 21 DeviceSingleWindowEventController::~DeviceSingleWindowEventController() {} |
| 22 | 22 |
| 23 void DeviceSingleWindowEventController::didUpdateData() { | 23 void DeviceSingleWindowEventController::didUpdateData() { |
| 24 dispatchDeviceEvent(lastEvent()); | 24 dispatchDeviceEvent(lastEvent()); |
| 25 } | 25 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 stopUpdating(); | 67 stopUpdating(); |
| 68 m_hasEventListener = false; | 68 m_hasEventListener = false; |
| 69 } | 69 } |
| 70 | 70 |
| 71 DEFINE_TRACE(DeviceSingleWindowEventController) { | 71 DEFINE_TRACE(DeviceSingleWindowEventController) { |
| 72 visitor->trace(m_document); | 72 visitor->trace(m_document); |
| 73 PlatformEventController::trace(visitor); | 73 PlatformEventController::trace(visitor); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |