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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 } | 1040 } |
1041 | 1041 |
1042 storage::FileSystemContext* file_system_context = | 1042 storage::FileSystemContext* file_system_context = |
1043 BrowserContext::GetStoragePartition(GetProcess()->GetBrowserContext(), | 1043 BrowserContext::GetStoragePartition(GetProcess()->GetBrowserContext(), |
1044 GetSiteInstance()) | 1044 GetSiteInstance()) |
1045 ->GetFileSystemContext(); | 1045 ->GetFileSystemContext(); |
1046 filtered_data.file_system_files.clear(); | 1046 filtered_data.file_system_files.clear(); |
1047 for (size_t i = 0; i < drop_data.file_system_files.size(); ++i) { | 1047 for (size_t i = 0; i < drop_data.file_system_files.size(); ++i) { |
1048 storage::FileSystemURL file_system_url = | 1048 storage::FileSystemURL file_system_url = |
1049 file_system_context->CrackURL(drop_data.file_system_files[i].url); | 1049 file_system_context->CrackURL(drop_data.file_system_files[i].url); |
1050 if (policy->CanReadFileSystemFile(GetProcess()->GetID(), file_system_url)) | 1050 if (policy->CanReadFileSystemFile(GetProcess()->GetID(), file_system_url)) { |
| 1051 CHECK(false); |
1051 filtered_data.file_system_files.push_back(drop_data.file_system_files[i]); | 1052 filtered_data.file_system_files.push_back(drop_data.file_system_files[i]); |
| 1053 } |
1052 } | 1054 } |
1053 | 1055 |
1054 float scale = GetScaleFactorForView(GetWidget()->GetView()); | 1056 float scale = GetScaleFactorForView(GetWidget()->GetView()); |
1055 gfx::ImageSkia image(gfx::ImageSkiaRep(bitmap, scale)); | 1057 gfx::ImageSkia image(gfx::ImageSkiaRep(bitmap, scale)); |
1056 view->StartDragging(filtered_data, drag_operations_mask, image, | 1058 view->StartDragging(filtered_data, drag_operations_mask, image, |
1057 bitmap_offset_in_dip, event_info); | 1059 bitmap_offset_in_dip, event_info); |
1058 } | 1060 } |
1059 | 1061 |
1060 void RenderViewHostImpl::OnUpdateDragCursor(WebDragOperation current_op) { | 1062 void RenderViewHostImpl::OnUpdateDragCursor(WebDragOperation current_op) { |
1061 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); | 1063 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 // Note: We are using the origin URL provided by the sender here. It may be | 1325 // Note: We are using the origin URL provided by the sender here. It may be |
1324 // different from the receiver's. | 1326 // different from the receiver's. |
1325 file_system_file.url = | 1327 file_system_file.url = |
1326 GURL(storage::GetIsolatedFileSystemRootURIString( | 1328 GURL(storage::GetIsolatedFileSystemRootURIString( |
1327 file_system_url.origin(), filesystem_id, std::string()) | 1329 file_system_url.origin(), filesystem_id, std::string()) |
1328 .append(register_name)); | 1330 .append(register_name)); |
1329 } | 1331 } |
1330 } | 1332 } |
1331 | 1333 |
1332 } // namespace content | 1334 } // namespace content |
OLD | NEW |