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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 1411913010: Propagate drag-and-drop key modifiers to WebView's guest renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/common/drag_traits.h » ('j') | content/public/common/drop_data.h » ('J')
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/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 blink::WebDragOperationsMask mask, 841 blink::WebDragOperationsMask mask,
842 const gfx::Point& location) { 842 const gfx::Point& location) {
843 RenderViewHost* host = GetWebContents()->GetRenderViewHost(); 843 RenderViewHost* host = GetWebContents()->GetRenderViewHost();
844 auto embedder = owner_web_contents_->GetBrowserPluginEmbedder(); 844 auto embedder = owner_web_contents_->GetBrowserPluginEmbedder();
845 switch (drag_status) { 845 switch (drag_status) {
846 case blink::WebDragStatusEnter: 846 case blink::WebDragStatusEnter:
847 // Only track the URL being dragged over the guest if the link isn't 847 // Only track the URL being dragged over the guest if the link isn't
848 // coming from the guest. 848 // coming from the guest.
849 if (!embedder->DragEnteredGuest(this)) 849 if (!embedder->DragEnteredGuest(this))
850 dragged_url_ = drop_data.url; 850 dragged_url_ = drop_data.url;
851 host->DragTargetDragEnter(drop_data, location, location, mask, 0); 851 host->DragTargetDragEnter(drop_data, location, location, mask,
852 drop_data.key_modifiers);
852 break; 853 break;
853 case blink::WebDragStatusOver: 854 case blink::WebDragStatusOver:
854 host->DragTargetDragOver(location, location, mask, 0); 855 host->DragTargetDragOver(location, location, mask,
856 drop_data.key_modifiers);
855 break; 857 break;
856 case blink::WebDragStatusLeave: 858 case blink::WebDragStatusLeave:
857 embedder->DragLeftGuest(this); 859 embedder->DragLeftGuest(this);
858 host->DragTargetDragLeave(); 860 host->DragTargetDragLeave();
859 break; 861 break;
860 case blink::WebDragStatusDrop: 862 case blink::WebDragStatusDrop:
861 host->DragTargetDrop(location, location, 0); 863 host->DragTargetDrop(location, location, drop_data.key_modifiers);
862 if (dragged_url_.is_valid()) { 864 if (dragged_url_.is_valid()) {
863 delegate_->DidDropLink(dragged_url_); 865 delegate_->DidDropLink(dragged_url_);
864 dragged_url_ = GURL(); 866 dragged_url_ = GURL();
865 } 867 }
866 break; 868 break;
867 case blink::WebDragStatusUnknown: 869 case blink::WebDragStatusUnknown:
868 NOTREACHED(); 870 NOTREACHED();
869 } 871 }
870 last_drag_status_ = drag_status; 872 last_drag_status_ = drag_status;
871 EndSystemDragIfApplicable(); 873 EndSystemDragIfApplicable();
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 range, character_bounds); 1057 range, character_bounds);
1056 } 1058 }
1057 #endif 1059 #endif
1058 1060
1059 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1061 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1060 if (delegate_) 1062 if (delegate_)
1061 delegate_->SetContextMenuPosition(position); 1063 delegate_->SetContextMenuPosition(position);
1062 } 1064 }
1063 1065
1064 } // namespace content 1066 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/drag_traits.h » ('j') | content/public/common/drop_data.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698