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

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

Issue 293563002: GetScaleFactorForNativeView should return scale factor in float (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 GetProcess()->GetBrowserContext(), 1282 GetProcess()->GetBrowserContext(),
1283 GetSiteInstance())->GetFileSystemContext(); 1283 GetSiteInstance())->GetFileSystemContext();
1284 filtered_data.file_system_files.clear(); 1284 filtered_data.file_system_files.clear();
1285 for (size_t i = 0; i < drop_data.file_system_files.size(); ++i) { 1285 for (size_t i = 0; i < drop_data.file_system_files.size(); ++i) {
1286 fileapi::FileSystemURL file_system_url = 1286 fileapi::FileSystemURL file_system_url =
1287 file_system_context->CrackURL(drop_data.file_system_files[i].url); 1287 file_system_context->CrackURL(drop_data.file_system_files[i].url);
1288 if (policy->CanReadFileSystemFile(GetProcess()->GetID(), file_system_url)) 1288 if (policy->CanReadFileSystemFile(GetProcess()->GetID(), file_system_url))
1289 filtered_data.file_system_files.push_back(drop_data.file_system_files[i]); 1289 filtered_data.file_system_files.push_back(drop_data.file_system_files[i]);
1290 } 1290 }
1291 1291
1292 float scale = ui::GetImageScale(GetScaleFactorForView(GetView())); 1292 float scale = GetScaleFactorForView(GetView());
1293 gfx::ImageSkia image(gfx::ImageSkiaRep(bitmap, scale)); 1293 gfx::ImageSkia image(gfx::ImageSkiaRep(bitmap, scale));
1294 view->StartDragging(filtered_data, drag_operations_mask, image, 1294 view->StartDragging(filtered_data, drag_operations_mask, image,
1295 bitmap_offset_in_dip, event_info); 1295 bitmap_offset_in_dip, event_info);
1296 } 1296 }
1297 1297
1298 void RenderViewHostImpl::OnUpdateDragCursor(WebDragOperation current_op) { 1298 void RenderViewHostImpl::OnUpdateDragCursor(WebDragOperation current_op) {
1299 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); 1299 RenderViewHostDelegateView* view = delegate_->GetDelegateView();
1300 if (view) 1300 if (view)
1301 view->UpdateDragCursor(current_op); 1301 view->UpdateDragCursor(current_op);
1302 } 1302 }
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 FrameTree* frame_tree = delegate_->GetFrameTree(); 1685 FrameTree* frame_tree = delegate_->GetFrameTree();
1686 1686
1687 frame_tree->ResetForMainFrameSwap(); 1687 frame_tree->ResetForMainFrameSwap();
1688 } 1688 }
1689 1689
1690 void RenderViewHostImpl::SelectWordAroundCaret() { 1690 void RenderViewHostImpl::SelectWordAroundCaret() {
1691 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1691 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1692 } 1692 }
1693 1693
1694 } // namespace content 1694 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698