| 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/UserGestureIndicator.h" | 8 #include "core/dom/UserGestureIndicator.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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 if (!hit_test_contains_links && | 326 if (!hit_test_contains_links && |
| 327 mouse_event_manager_->HandleDragDropIfPossible(targeted_event)) { | 327 mouse_event_manager_->HandleDragDropIfPossible(targeted_event)) { |
| 328 long_tap_should_invoke_context_menu_ = true; | 328 long_tap_should_invoke_context_menu_ = true; |
| 329 return WebInputEventResult::kHandledSystem; | 329 return WebInputEventResult::kHandledSystem; |
| 330 } | 330 } |
| 331 | 331 |
| 332 Node* inner_node = hit_test_result.InnerNode(); | 332 Node* inner_node = hit_test_result.InnerNode(); |
| 333 if (inner_node && inner_node->GetLayoutObject() && | 333 if (inner_node && inner_node->GetLayoutObject() && |
| 334 selection_controller_->HandleGestureLongPress(hit_test_result)) { | 334 selection_controller_->HandleGestureLongPress(hit_test_result)) { |
| 335 mouse_event_manager_->FocusDocumentView(); | 335 mouse_event_manager_->FocusDocumentView(); |
| 336 return WebInputEventResult::kHandledSystem; | |
| 337 } | 336 } |
| 338 | 337 |
| 339 return SendContextMenuEventForGesture(targeted_event); | 338 return SendContextMenuEventForGesture(targeted_event); |
| 340 } | 339 } |
| 341 | 340 |
| 342 WebInputEventResult GestureManager::HandleGestureLongTap( | 341 WebInputEventResult GestureManager::HandleGestureLongTap( |
| 343 const GestureEventWithHitTestResults& targeted_event) { | 342 const GestureEventWithHitTestResults& targeted_event) { |
| 344 #if !OS(ANDROID) | 343 #if !OS(ANDROID) |
| 345 if (long_tap_should_invoke_context_menu_) { | 344 if (long_tap_should_invoke_context_menu_) { |
| 346 long_tap_should_invoke_context_menu_ = false; | 345 long_tap_should_invoke_context_menu_ = false; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 } | 426 } |
| 428 return WebInputEventResult::kNotHandled; | 427 return WebInputEventResult::kNotHandled; |
| 429 } | 428 } |
| 430 | 429 |
| 431 WTF::Optional<WTF::TimeTicks> GestureManager::GetLastShowPressTimestamp() | 430 WTF::Optional<WTF::TimeTicks> GestureManager::GetLastShowPressTimestamp() |
| 432 const { | 431 const { |
| 433 return last_show_press_timestamp_; | 432 return last_show_press_timestamp_; |
| 434 } | 433 } |
| 435 | 434 |
| 436 } // namespace blink | 435 } // namespace blink |
| OLD | NEW |