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 "web/WebFrameWidgetBase.h" | 5 #include "web/WebFrameWidgetBase.h" |
6 | 6 |
7 #include "core/frame/FrameHost.h" | 7 #include "core/frame/FrameHost.h" |
8 #include "core/frame/VisualViewport.h" | 8 #include "core/frame/VisualViewport.h" |
9 #include "core/input/EventHandler.h" | 9 #include "core/input/EventHandler.h" |
10 #include "core/page/DragActions.h" | 10 #include "core/page/DragActions.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 cancelDrag(); | 134 cancelDrag(); |
135 return; | 135 return; |
136 } | 136 } |
137 WebFloatPoint pointInRootFrame( | 137 WebFloatPoint pointInRootFrame( |
138 page()->frameHost().visualViewport().viewportToRootFrame( | 138 page()->frameHost().visualViewport().viewportToRootFrame( |
139 pointInViewport)); | 139 pointInViewport)); |
140 | 140 |
141 WebMouseEvent fakeMouseMove(WebInputEvent::MouseMove, pointInRootFrame, | 141 WebMouseEvent fakeMouseMove(WebInputEvent::MouseMove, pointInRootFrame, |
142 WebFloatPoint(screenPoint.x, screenPoint.y), | 142 WebFloatPoint(screenPoint.x, screenPoint.y), |
143 WebPointerProperties::Button::Left, 0, | 143 WebPointerProperties::Button::Left, 0, |
144 PlatformEvent::NoModifiers, | 144 WebInputEvent::NoModifiers, |
145 TimeTicks::Now().InSeconds()); | 145 TimeTicks::Now().InSeconds()); |
146 fakeMouseMove.setFrameScale(1); | 146 fakeMouseMove.setFrameScale(1); |
147 toCoreFrame(localRoot()) | 147 toCoreFrame(localRoot()) |
148 ->eventHandler() | 148 ->eventHandler() |
149 .dragSourceEndedAt(fakeMouseMove, static_cast<DragOperation>(operation)); | 149 .dragSourceEndedAt(fakeMouseMove, static_cast<DragOperation>(operation)); |
150 } | 150 } |
151 | 151 |
152 void WebFrameWidgetBase::dragSourceSystemDragEnded() { | 152 void WebFrameWidgetBase::dragSourceSystemDragEnded() { |
153 cancelDrag(); | 153 cancelDrag(); |
154 } | 154 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 WebViewImpl* WebFrameWidgetBase::view() const { | 213 WebViewImpl* WebFrameWidgetBase::view() const { |
214 return toWebLocalFrameImpl(localRoot())->viewImpl(); | 214 return toWebLocalFrameImpl(localRoot())->viewImpl(); |
215 } | 215 } |
216 | 216 |
217 Page* WebFrameWidgetBase::page() const { | 217 Page* WebFrameWidgetBase::page() const { |
218 return view()->page(); | 218 return view()->page(); |
219 } | 219 } |
220 | 220 |
221 } // namespace blink | 221 } // namespace blink |
OLD | NEW |