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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2242173005: End the drag and drop operation properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | content/browser/web_contents/web_contents_view_android.cc » ('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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 delegate_->RouteCloseEvent(this); 1003 delegate_->RouteCloseEvent(this);
1004 } 1004 }
1005 1005
1006 void RenderViewHostImpl::OnStartDragging( 1006 void RenderViewHostImpl::OnStartDragging(
1007 const DropData& drop_data, 1007 const DropData& drop_data,
1008 WebDragOperationsMask drag_operations_mask, 1008 WebDragOperationsMask drag_operations_mask,
1009 const SkBitmap& bitmap, 1009 const SkBitmap& bitmap,
1010 const gfx::Vector2d& bitmap_offset_in_dip, 1010 const gfx::Vector2d& bitmap_offset_in_dip,
1011 const DragEventSourceInfo& event_info) { 1011 const DragEventSourceInfo& event_info) {
1012 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); 1012 RenderViewHostDelegateView* view = delegate_->GetDelegateView();
1013 if (!view) 1013 if (!view) {
1014 // Need to clear drag and drop state in blink.
1015 DragSourceSystemDragEnded();
1014 return; 1016 return;
1017 }
1015 1018
1016 DropData filtered_data(drop_data); 1019 DropData filtered_data(drop_data);
1017 RenderProcessHost* process = GetProcess(); 1020 RenderProcessHost* process = GetProcess();
1018 ChildProcessSecurityPolicyImpl* policy = 1021 ChildProcessSecurityPolicyImpl* policy =
1019 ChildProcessSecurityPolicyImpl::GetInstance(); 1022 ChildProcessSecurityPolicyImpl::GetInstance();
1020 1023
1021 // Allow drag of Javascript URLs to enable bookmarklet drag to bookmark bar. 1024 // Allow drag of Javascript URLs to enable bookmarklet drag to bookmark bar.
1022 if (!filtered_data.url.SchemeIs(url::kJavaScriptScheme)) 1025 if (!filtered_data.url.SchemeIs(url::kJavaScriptScheme))
1023 process->FilterURL(true, &filtered_data.url); 1026 process->FilterURL(true, &filtered_data.url);
1024 process->FilterURL(false, &filtered_data.html_base_url); 1027 process->FilterURL(false, &filtered_data.html_base_url);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 // Note: We are using the origin URL provided by the sender here. It may be 1324 // Note: We are using the origin URL provided by the sender here. It may be
1322 // different from the receiver's. 1325 // different from the receiver's.
1323 file_system_file.url = 1326 file_system_file.url =
1324 GURL(storage::GetIsolatedFileSystemRootURIString( 1327 GURL(storage::GetIsolatedFileSystemRootURIString(
1325 file_system_url.origin(), filesystem_id, std::string()) 1328 file_system_url.origin(), filesystem_id, std::string())
1326 .append(register_name)); 1329 .append(register_name));
1327 } 1330 }
1328 } 1331 }
1329 1332
1330 } // namespace content 1333 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698