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

Side by Side Diff: third_party/WebKit/Source/core/frame/DeviceSingleWindowEventController.cpp

Issue 2134063002: Remove DOMWindowLifecycleObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 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 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/frame/LocalDOMWindow.h"
10 #include "core/page/Page.h" 9 #include "core/page/Page.h"
11 10
12 namespace blink { 11 namespace blink {
13 12
14 DeviceSingleWindowEventController::DeviceSingleWindowEventController(Document& d ocument) 13 DeviceSingleWindowEventController::DeviceSingleWindowEventController(Document& d ocument)
15 : PlatformEventController(document.page()) 14 : PlatformEventController(document.page())
16 , DOMWindowLifecycleObserver(document.domWindow())
17 , m_needsCheckingNullEvents(true) 15 , m_needsCheckingNullEvents(true)
18 , m_document(document) 16 , m_document(document)
19 { 17 {
18 document.domWindow()->registerEventListenerObserver(this);
20 } 19 }
21 20
22 DeviceSingleWindowEventController::~DeviceSingleWindowEventController() 21 DeviceSingleWindowEventController::~DeviceSingleWindowEventController()
23 { 22 {
24 } 23 }
25 24
26 void DeviceSingleWindowEventController::didUpdateData() 25 void DeviceSingleWindowEventController::didUpdateData()
27 { 26 {
28 dispatchDeviceEvent(lastEvent()); 27 dispatchDeviceEvent(lastEvent());
29 } 28 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void DeviceSingleWindowEventController::didRemoveAllEventListeners(LocalDOMWindo w*) 65 void DeviceSingleWindowEventController::didRemoveAllEventListeners(LocalDOMWindo w*)
67 { 66 {
68 stopUpdating(); 67 stopUpdating();
69 m_hasEventListener = false; 68 m_hasEventListener = false;
70 } 69 }
71 70
72 DEFINE_TRACE(DeviceSingleWindowEventController) 71 DEFINE_TRACE(DeviceSingleWindowEventController)
73 { 72 {
74 visitor->trace(m_document); 73 visitor->trace(m_document);
75 PlatformEventController::trace(visitor); 74 PlatformEventController::trace(visitor);
76 DOMWindowLifecycleObserver::trace(visitor);
77 } 75 }
78 76
79 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698