| 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/EventHandlerRegistry.h" | 5 #include "core/frame/EventHandlerRegistry.h" |
| 6 | 6 |
| 7 #include "core/frame/LocalDOMWindow.h" | 7 #include "core/frame/LocalDOMWindow.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/html/HTMLFrameOwnerElement.h" | 9 #include "core/html/HTMLFrameOwnerElement.h" |
| 10 #include "core/page/ChromeClient.h" | 10 #include "core/page/ChromeClient.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 void EventHandlerRegistry::didRemoveAllEventHandlers(EventTarget& target) | 188 void EventHandlerRegistry::didRemoveAllEventHandlers(EventTarget& target) |
| 189 { | 189 { |
| 190 for (size_t i = 0; i < EventHandlerClassCount; ++i) { | 190 for (size_t i = 0; i < EventHandlerClassCount; ++i) { |
| 191 EventHandlerClass handlerClass = static_cast<EventHandlerClass>(i); | 191 EventHandlerClass handlerClass = static_cast<EventHandlerClass>(i); |
| 192 updateEventHandlerInternal(RemoveAll, handlerClass, &target); | 192 updateEventHandlerInternal(RemoveAll, handlerClass, &target); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 void EventHandlerRegistry::notifyHasHandlersChanged(EventHandlerClass handlerCla
ss, bool hasActiveHandlers) | 196 void EventHandlerRegistry::notifyHasHandlersChanged(EventHandlerClass handlerCla
ss, bool hasActiveHandlers) |
| 197 { | 197 { |
| 198 ScrollingCoordinator* scrollingCoordinator = m_frameHost->page().scrollingCo
ordinator(); | |
| 199 | |
| 200 switch (handlerClass) { | 198 switch (handlerClass) { |
| 201 case ScrollEvent: | 199 case ScrollEvent: |
| 202 if (scrollingCoordinator) | 200 m_frameHost->chromeClient().setHaveScrollEventHandlers(hasActiveHandlers
); |
| 203 scrollingCoordinator->updateHaveScrollEventHandlers(); | |
| 204 break; | 201 break; |
| 205 case WheelEvent: | 202 case WheelEvent: |
| 206 m_frameHost->chromeClient().setHaveWheelEventHandlers(hasActiveHandlers)
; | 203 m_frameHost->chromeClient().setHaveWheelEventHandlers(hasActiveHandlers)
; |
| 207 break; | 204 break; |
| 208 case TouchEvent: | 205 case TouchEvent: |
| 209 m_frameHost->chromeClient().needTouchEvents(hasActiveHandlers); | 206 m_frameHost->chromeClient().needTouchEvents(hasActiveHandlers); |
| 210 break; | 207 break; |
| 211 #if ENABLE(ASSERT) | 208 #if ENABLE(ASSERT) |
| 212 case EventsForTesting: | 209 case EventsForTesting: |
| 213 break; | 210 break; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 ASSERT(window->frame()); | 292 ASSERT(window->frame()); |
| 296 ASSERT(window->frame()->host()); | 293 ASSERT(window->frame()->host()); |
| 297 ASSERT(window->frame()->host() == m_frameHost); | 294 ASSERT(window->frame()->host() == m_frameHost); |
| 298 } | 295 } |
| 299 } | 296 } |
| 300 } | 297 } |
| 301 #endif // ENABLE(ASSERT) | 298 #endif // ENABLE(ASSERT) |
| 302 } | 299 } |
| 303 | 300 |
| 304 } // namespace blink | 301 } // namespace blink |
| OLD | NEW |