| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 class Scrollbar; | 77 class Scrollbar; |
| 78 class SelectionController; | 78 class SelectionController; |
| 79 class TextEvent; | 79 class TextEvent; |
| 80 class WheelEvent; | 80 class WheelEvent; |
| 81 | 81 |
| 82 class CORE_EXPORT EventHandler final | 82 class CORE_EXPORT EventHandler final |
| 83 : public GarbageCollectedFinalized<EventHandler> { | 83 : public GarbageCollectedFinalized<EventHandler> { |
| 84 WTF_MAKE_NONCOPYABLE(EventHandler); | 84 WTF_MAKE_NONCOPYABLE(EventHandler); |
| 85 | 85 |
| 86 public: | 86 public: |
| 87 explicit EventHandler(LocalFrame&); | 87 explicit EventHandler(LocalFrame*); |
| 88 DECLARE_TRACE(); | 88 DECLARE_TRACE(); |
| 89 | 89 |
| 90 void clear(); | 90 void clear(); |
| 91 | 91 |
| 92 void updateSelectionForMouseDrag(); | 92 void updateSelectionForMouseDrag(); |
| 93 void startMiddleClickAutoscroll(LayoutObject*); | 93 void startMiddleClickAutoscroll(LayoutObject*); |
| 94 | 94 |
| 95 // TODO(nzolghadr): Some of the APIs in this class only forward the action | 95 // TODO(nzolghadr): Some of the APIs in this class only forward the action |
| 96 // to the corresponding Manager class. We need to investigate whether it is | 96 // to the corresponding Manager class. We need to investigate whether it is |
| 97 // better to expose the manager instance itself later or can the access to | 97 // better to expose the manager instance itself later or can the access to |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 bool rootFrameTouchPointerActiveInCurrentFrame(int pointerId) const; | 338 bool rootFrameTouchPointerActiveInCurrentFrame(int pointerId) const; |
| 339 | 339 |
| 340 // NOTE: If adding a new field to this class please ensure that it is | 340 // NOTE: If adding a new field to this class please ensure that it is |
| 341 // cleared in |EventHandler::clear()|. | 341 // cleared in |EventHandler::clear()|. |
| 342 | 342 |
| 343 const Member<LocalFrame> m_frame; | 343 const Member<LocalFrame> m_frame; |
| 344 | 344 |
| 345 const Member<SelectionController> m_selectionController; | 345 const Member<SelectionController> m_selectionController; |
| 346 | 346 |
| 347 TaskRunnerTimer<EventHandler> m_hoverTimer; | 347 Timer<EventHandler> m_hoverTimer; |
| 348 | 348 |
| 349 // TODO(rbyers): Mouse cursor update is page-wide, not per-frame. Page-wide | 349 // TODO(rbyers): Mouse cursor update is page-wide, not per-frame. Page-wide |
| 350 // state should move out of EventHandler to a new PageEventHandler class. | 350 // state should move out of EventHandler to a new PageEventHandler class. |
| 351 // crbug.com/449649 | 351 // crbug.com/449649 |
| 352 TaskRunnerTimer<EventHandler> m_cursorUpdateTimer; | 352 Timer<EventHandler> m_cursorUpdateTimer; |
| 353 | 353 |
| 354 Member<Node> m_capturingMouseEventsNode; | 354 Member<Node> m_capturingMouseEventsNode; |
| 355 bool m_eventHandlerWillResetCapturingMouseEventsNode; | 355 bool m_eventHandlerWillResetCapturingMouseEventsNode; |
| 356 | 356 |
| 357 Member<LocalFrame> m_lastMouseMoveEventSubframe; | 357 Member<LocalFrame> m_lastMouseMoveEventSubframe; |
| 358 Member<Scrollbar> m_lastScrollbarUnderMouse; | 358 Member<Scrollbar> m_lastScrollbarUnderMouse; |
| 359 | 359 |
| 360 Member<Node> m_dragTarget; | 360 Member<Node> m_dragTarget; |
| 361 bool m_shouldOnlyFireDragOverEvent; | 361 bool m_shouldOnlyFireDragOverEvent; |
| 362 | 362 |
| 363 Member<HTMLFrameSetElement> m_frameSetBeingResized; | 363 Member<HTMLFrameSetElement> m_frameSetBeingResized; |
| 364 | 364 |
| 365 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; | 365 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; |
| 366 | 366 |
| 367 Member<ScrollManager> m_scrollManager; | 367 Member<ScrollManager> m_scrollManager; |
| 368 Member<MouseEventManager> m_mouseEventManager; | 368 Member<MouseEventManager> m_mouseEventManager; |
| 369 Member<KeyboardEventManager> m_keyboardEventManager; | 369 Member<KeyboardEventManager> m_keyboardEventManager; |
| 370 Member<PointerEventManager> m_pointerEventManager; | 370 Member<PointerEventManager> m_pointerEventManager; |
| 371 Member<GestureManager> m_gestureManager; | 371 Member<GestureManager> m_gestureManager; |
| 372 | 372 |
| 373 double m_maxMouseMovedDuration; | 373 double m_maxMouseMovedDuration; |
| 374 | 374 |
| 375 bool m_longTapShouldInvokeContextMenu; | 375 bool m_longTapShouldInvokeContextMenu; |
| 376 | 376 |
| 377 TaskRunnerTimer<EventHandler> m_activeIntervalTimer; | 377 Timer<EventHandler> m_activeIntervalTimer; |
| 378 double m_lastShowPressTimestamp; | 378 double m_lastShowPressTimestamp; |
| 379 Member<Element> m_lastDeferredTapElement; | 379 Member<Element> m_lastDeferredTapElement; |
| 380 | 380 |
| 381 // Set on GestureTapDown if the |pointerdown| event corresponding to the | 381 // Set on GestureTapDown if the |pointerdown| event corresponding to the |
| 382 // triggering |touchstart| event was canceled. This suppresses mouse event | 382 // triggering |touchstart| event was canceled. This suppresses mouse event |
| 383 // firing for the current gesture sequence (i.e. until next GestureTapDown). | 383 // firing for the current gesture sequence (i.e. until next GestureTapDown). |
| 384 bool m_suppressMouseEventsFromGestures; | 384 bool m_suppressMouseEventsFromGestures; |
| 385 }; | 385 }; |
| 386 | 386 |
| 387 } // namespace blink | 387 } // namespace blink |
| 388 | 388 |
| 389 #endif // EventHandler_h | 389 #endif // EventHandler_h |
| OLD | NEW |