Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: content/renderer/render_widget.cc

Issue 2655463015: Correctly set dragLeave and dragEnd coords for OOPIF drag and drop (Closed)
Patch Set: Added checks for null RWH on drag end Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_widget.h ('k') | third_party/WebKit/Source/web/WebFrameWidgetBase.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 1726
1727 DCHECK(GetWebWidget()->isWebFrameWidget()); 1727 DCHECK(GetWebWidget()->isWebFrameWidget());
1728 WebDragOperation operation = 1728 WebDragOperation operation =
1729 static_cast<WebFrameWidget*>(GetWebWidget())->dragTargetDragOver( 1729 static_cast<WebFrameWidget*>(GetWebWidget())->dragTargetDragOver(
1730 ConvertWindowPointToViewport(client_point), 1730 ConvertWindowPointToViewport(client_point),
1731 screen_point, ops, key_modifiers); 1731 screen_point, ops, key_modifiers);
1732 1732
1733 Send(new DragHostMsg_UpdateDragCursor(routing_id(), operation)); 1733 Send(new DragHostMsg_UpdateDragCursor(routing_id(), operation));
1734 } 1734 }
1735 1735
1736 void RenderWidget::OnDragTargetDragLeave() { 1736 void RenderWidget::OnDragTargetDragLeave(const gfx::Point& client_point,
1737 const gfx::Point& screen_point) {
1737 if (!GetWebWidget()) 1738 if (!GetWebWidget())
1738 return; 1739 return;
1739 DCHECK(GetWebWidget()->isWebFrameWidget()); 1740 DCHECK(GetWebWidget()->isWebFrameWidget());
1740 static_cast<WebFrameWidget*>(GetWebWidget())->dragTargetDragLeave(); 1741 static_cast<WebFrameWidget*>(GetWebWidget())
1742 ->dragTargetDragLeave(ConvertWindowPointToViewport(client_point),
1743 screen_point);
1741 } 1744 }
1742 1745
1743 void RenderWidget::OnDragTargetDrop(const DropData& drop_data, 1746 void RenderWidget::OnDragTargetDrop(const DropData& drop_data,
1744 const gfx::Point& client_point, 1747 const gfx::Point& client_point,
1745 const gfx::Point& screen_point, 1748 const gfx::Point& screen_point,
1746 int key_modifiers) { 1749 int key_modifiers) {
1747 if (!GetWebWidget()) 1750 if (!GetWebWidget())
1748 return; 1751 return;
1749 1752
1750 DCHECK(GetWebWidget()->isWebFrameWidget()); 1753 DCHECK(GetWebWidget()->isWebFrameWidget());
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 // browser side (https://crbug.com/669219). 2293 // browser side (https://crbug.com/669219).
2291 // If there is no WebFrameWidget, then there will be no 2294 // If there is no WebFrameWidget, then there will be no
2292 // InputMethodControllers for a WebLocalFrame. 2295 // InputMethodControllers for a WebLocalFrame.
2293 return nullptr; 2296 return nullptr;
2294 } 2297 }
2295 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2298 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2296 ->getActiveWebInputMethodController(); 2299 ->getActiveWebInputMethodController();
2297 } 2300 }
2298 2301
2299 } // namespace content 2302 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | third_party/WebKit/Source/web/WebFrameWidgetBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698