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

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

Issue 2501213002: Drag-and-drop: dragSourceEndedAt, dragSourceSystemDragEnded (Closed)
Patch Set: Created 4 years, 1 month 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) 624 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
625 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, 625 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests,
626 OnWaitNextFrameForTests) 626 OnWaitNextFrameForTests)
627 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, 627 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate,
628 OnRequestCompositionUpdate) 628 OnRequestCompositionUpdate)
629 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto) 629 IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto)
630 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) 630 IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter)
631 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) 631 IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver)
632 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) 632 IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave)
633 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop) 633 IPC_MESSAGE_HANDLER(DragMsg_TargetDrop, OnDragTargetDrop)
634 IPC_MESSAGE_HANDLER(DragMsg_SourceEnded, OnDragSourceEnded)
635 IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded,
636 OnDragSourceSystemDragEnded)
634 #if defined(OS_ANDROID) 637 #if defined(OS_ANDROID)
635 IPC_MESSAGE_HANDLER(InputMsg_ImeEventAck, OnImeEventAck) 638 IPC_MESSAGE_HANDLER(InputMsg_ImeEventAck, OnImeEventAck)
636 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate, 639 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate,
637 OnRequestTextInputStateUpdate) 640 OnRequestTextInputStateUpdate)
638 #endif 641 #endif
639 IPC_MESSAGE_UNHANDLED(handled = false) 642 IPC_MESSAGE_UNHANDLED(handled = false)
640 IPC_END_MESSAGE_MAP() 643 IPC_END_MESSAGE_MAP()
641 return handled; 644 return handled;
642 } 645 }
643 646
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 if (!GetWebWidget()) 1702 if (!GetWebWidget())
1700 return; 1703 return;
1701 1704
1702 DCHECK(GetWebWidget()->isWebFrameWidget()); 1705 DCHECK(GetWebWidget()->isWebFrameWidget());
1703 static_cast<WebFrameWidget*>(GetWebWidget())->dragTargetDrop( 1706 static_cast<WebFrameWidget*>(GetWebWidget())->dragTargetDrop(
1704 DropDataToWebDragData(drop_data), 1707 DropDataToWebDragData(drop_data),
1705 ConvertWindowPointToViewport(client_point), 1708 ConvertWindowPointToViewport(client_point),
1706 screen_point, key_modifiers); 1709 screen_point, key_modifiers);
1707 } 1710 }
1708 1711
1712 void RenderWidget::OnDragSourceEnded(const gfx::Point& client_point,
1713 const gfx::Point& screen_point,
1714 WebDragOperation op) {
ncarter (slow) 2016/11/14 23:21:37 RenderWidget::OnDragTargetDrop seems to defend aga
paulmeyer 2016/11/15 01:20:31 Good catch. I believe it is actually needed. If yo
1715 static_cast<WebFrameWidget*>(GetWebWidget())->dragSourceEndedAt(
1716 ConvertWindowPointToViewport(client_point), screen_point, op);
1717 }
1718
1719 void RenderWidget::OnDragSourceSystemDragEnded() {
1720 static_cast<WebFrameWidget*>(GetWebWidget())->dragSourceSystemDragEnded();
1721 }
1722
1709 void RenderWidget::showImeIfNeeded() { 1723 void RenderWidget::showImeIfNeeded() {
1710 #if defined(OS_ANDROID) || defined(USE_AURA) 1724 #if defined(OS_ANDROID) || defined(USE_AURA)
1711 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME); 1725 UpdateTextInputState(ShowIme::IF_NEEDED, ChangeSource::FROM_NON_IME);
1712 #endif 1726 #endif
1713 1727
1714 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with 1728 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with
1715 // virtual keyboard. 1729 // virtual keyboard.
1716 #if !defined(OS_ANDROID) 1730 #if !defined(OS_ANDROID)
1717 FocusChangeComplete(); 1731 FocusChangeComplete();
1718 #endif 1732 #endif
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 blink::WebInputMethodController* RenderWidget::GetInputMethodController() 2300 blink::WebInputMethodController* RenderWidget::GetInputMethodController()
2287 const { 2301 const {
2288 // TODO(ekaramad): Remove this CHECK when GetWebWidget() is 2302 // TODO(ekaramad): Remove this CHECK when GetWebWidget() is
2289 // always a WebFrameWidget. 2303 // always a WebFrameWidget.
2290 CHECK(GetWebWidget()->isWebFrameWidget()); 2304 CHECK(GetWebWidget()->isWebFrameWidget());
2291 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2305 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2292 ->getActiveWebInputMethodController(); 2306 ->getActiveWebInputMethodController();
2293 } 2307 }
2294 2308
2295 } // namespace content 2309 } // 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