| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 /* clickCount */ 0, static_cast<PlatformEvent::Modifiers>(modifiers), | 368 /* clickCount */ 0, static_cast<PlatformEvent::Modifiers>(modifiers), |
| 369 PlatformMouseEvent::FromTouch, | 369 PlatformMouseEvent::FromTouch, |
| 370 TimeTicks::FromSeconds(gestureEvent.timeStampSeconds), | 370 TimeTicks::FromSeconds(gestureEvent.timeStampSeconds), |
| 371 WebPointerProperties::PointerType::Mouse); | 371 WebPointerProperties::PointerType::Mouse); |
| 372 m_mouseEventManager->setMousePositionAndDispatchMouseEvent( | 372 m_mouseEventManager->setMousePositionAndDispatchMouseEvent( |
| 373 targetedEvent.hitTestResult().innerNode(), EventTypeNames::mousemove, | 373 targetedEvent.hitTestResult().innerNode(), EventTypeNames::mousemove, |
| 374 fakeMouseMove); | 374 fakeMouseMove); |
| 375 } | 375 } |
| 376 | 376 |
| 377 PlatformEvent::EventType eventType = PlatformEvent::MousePressed; | 377 PlatformEvent::EventType eventType = PlatformEvent::MousePressed; |
| 378 if (m_frame->settings() && m_frame->settings()->showContextMenuOnMouseUp()) | 378 if (m_frame->settings() && m_frame->settings()->getShowContextMenuOnMouseUp()) |
| 379 eventType = PlatformEvent::MouseReleased; | 379 eventType = PlatformEvent::MouseReleased; |
| 380 | 380 |
| 381 PlatformMouseEvent mouseEvent( | 381 PlatformMouseEvent mouseEvent( |
| 382 gestureEvent, WebPointerProperties::Button::Right, eventType, | 382 gestureEvent, WebPointerProperties::Button::Right, eventType, |
| 383 /* clickCount */ 1, | 383 /* clickCount */ 1, |
| 384 static_cast<PlatformEvent::Modifiers>( | 384 static_cast<PlatformEvent::Modifiers>( |
| 385 modifiers | PlatformEvent::Modifiers::RightButtonDown), | 385 modifiers | PlatformEvent::Modifiers::RightButtonDown), |
| 386 PlatformMouseEvent::FromTouch, TimeTicks::Now(), | 386 PlatformMouseEvent::FromTouch, TimeTicks::Now(), |
| 387 WebPointerProperties::PointerType::Mouse); | 387 WebPointerProperties::PointerType::Mouse); |
| 388 | 388 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 TimeTicks GestureManager::getLastShowPressTimestamp() const { |
| 430 return m_lastShowPressTimestamp; | 430 return m_lastShowPressTimestamp; |
| 431 } | 431 } |
| 432 | 432 |
| 433 } // namespace blink | 433 } // namespace blink |
| OLD | NEW |