| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 | 1717 |
| 1718 DCHECK(GetWebWidget()->isWebFrameWidget()); | 1718 DCHECK(GetWebWidget()->isWebFrameWidget()); |
| 1719 WebDragOperation operation = | 1719 WebDragOperation operation = |
| 1720 static_cast<WebFrameWidget*>(GetWebWidget())->dragTargetDragOver( | 1720 static_cast<WebFrameWidget*>(GetWebWidget())->dragTargetDragOver( |
| 1721 ConvertWindowPointToViewport(client_point), | 1721 ConvertWindowPointToViewport(client_point), |
| 1722 screen_point, ops, key_modifiers); | 1722 screen_point, ops, key_modifiers); |
| 1723 | 1723 |
| 1724 Send(new DragHostMsg_UpdateDragCursor(routing_id(), operation)); | 1724 Send(new DragHostMsg_UpdateDragCursor(routing_id(), operation)); |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 void RenderWidget::OnDragTargetDragLeave() { | 1727 void RenderWidget::OnDragTargetDragLeave(const gfx::Point& client_point, |
| 1728 const gfx::Point& screen_point) { |
| 1728 if (!GetWebWidget()) | 1729 if (!GetWebWidget()) |
| 1729 return; | 1730 return; |
| 1730 DCHECK(GetWebWidget()->isWebFrameWidget()); | 1731 DCHECK(GetWebWidget()->isWebFrameWidget()); |
| 1731 static_cast<WebFrameWidget*>(GetWebWidget())->dragTargetDragLeave(); | 1732 static_cast<WebFrameWidget*>(GetWebWidget()) |
| 1733 ->dragTargetDragLeave(ConvertWindowPointToViewport(client_point), |
| 1734 screen_point); |
| 1732 } | 1735 } |
| 1733 | 1736 |
| 1734 void RenderWidget::OnDragTargetDrop(const DropData& drop_data, | 1737 void RenderWidget::OnDragTargetDrop(const DropData& drop_data, |
| 1735 const gfx::Point& client_point, | 1738 const gfx::Point& client_point, |
| 1736 const gfx::Point& screen_point, | 1739 const gfx::Point& screen_point, |
| 1737 int key_modifiers) { | 1740 int key_modifiers) { |
| 1738 if (!GetWebWidget()) | 1741 if (!GetWebWidget()) |
| 1739 return; | 1742 return; |
| 1740 | 1743 |
| 1741 DCHECK(GetWebWidget()->isWebFrameWidget()); | 1744 DCHECK(GetWebWidget()->isWebFrameWidget()); |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2286 // browser side (https://crbug.com/669219). | 2289 // browser side (https://crbug.com/669219). |
| 2287 // If there is no WebFrameWidget, then there will be no | 2290 // If there is no WebFrameWidget, then there will be no |
| 2288 // InputMethodControllers for a WebLocalFrame. | 2291 // InputMethodControllers for a WebLocalFrame. |
| 2289 return nullptr; | 2292 return nullptr; |
| 2290 } | 2293 } |
| 2291 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2294 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
| 2292 ->getActiveWebInputMethodController(); | 2295 ->getActiveWebInputMethodController(); |
| 2293 } | 2296 } |
| 2294 | 2297 |
| 2295 } // namespace content | 2298 } // namespace content |
| OLD | NEW |