| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |