OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/input/GestureManager.h" | 5 #include "core/input/GestureManager.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/dom/DocumentUserGestureToken.h" | 8 #include "core/dom/DocumentUserGestureToken.h" |
9 #include "core/editing/SelectionController.h" | 9 #include "core/editing/SelectionController.h" |
10 #include "core/events/GestureEvent.h" | 10 #include "core/events/GestureEvent.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 m_scrollManager(scrollManager), | 28 m_scrollManager(scrollManager), |
29 m_mouseEventManager(mouseEventManager), | 29 m_mouseEventManager(mouseEventManager), |
30 m_pointerEventManager(pointerEventManager), | 30 m_pointerEventManager(pointerEventManager), |
31 m_selectionController(selectionController) { | 31 m_selectionController(selectionController) { |
32 clear(); | 32 clear(); |
33 } | 33 } |
34 | 34 |
35 void GestureManager::clear() { | 35 void GestureManager::clear() { |
36 m_suppressMouseEventsFromGestures = false; | 36 m_suppressMouseEventsFromGestures = false; |
37 m_longTapShouldInvokeContextMenu = false; | 37 m_longTapShouldInvokeContextMenu = false; |
38 m_lastShowPressTimestamp = TimeTicks(); | 38 m_lastShowPressTimestamp.reset(); |
39 } | 39 } |
40 | 40 |
41 DEFINE_TRACE(GestureManager) { | 41 DEFINE_TRACE(GestureManager) { |
42 visitor->trace(m_frame); | 42 visitor->trace(m_frame); |
43 visitor->trace(m_scrollManager); | 43 visitor->trace(m_scrollManager); |
44 visitor->trace(m_mouseEventManager); | 44 visitor->trace(m_mouseEventManager); |
45 visitor->trace(m_pointerEventManager); | 45 visitor->trace(m_pointerEventManager); |
46 visitor->trace(m_selectionController); | 46 visitor->trace(m_selectionController); |
47 } | 47 } |
48 | 48 |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 return WebInputEventResult::NotHandled; | 419 return WebInputEventResult::NotHandled; |
420 } | 420 } |
421 | 421 |
422 FrameHost* GestureManager::frameHost() const { | 422 FrameHost* GestureManager::frameHost() const { |
423 if (!m_frame->page()) | 423 if (!m_frame->page()) |
424 return nullptr; | 424 return nullptr; |
425 | 425 |
426 return &m_frame->page()->frameHost(); | 426 return &m_frame->page()->frameHost(); |
427 } | 427 } |
428 | 428 |
429 TimeTicks GestureManager::getLastShowPressTimestamp() const { | 429 WTF::Optional<WTF::TimeTicks> GestureManager::getLastShowPressTimestamp() |
| 430 const { |
430 return m_lastShowPressTimestamp; | 431 return m_lastShowPressTimestamp; |
431 } | 432 } |
432 | 433 |
433 } // namespace blink | 434 } // namespace blink |
OLD | NEW |