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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1572703002: Use the screen info's scale factor to scale the drag image (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « content/renderer/render_view_impl.h ('k') | third_party/WebKit/Source/web/DragClientImpl.cpp » ('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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 } 2244 }
2245 2245
2246 int RenderViewImpl::GetRoutingID() const { 2246 int RenderViewImpl::GetRoutingID() const {
2247 return routing_id_; 2247 return routing_id_;
2248 } 2248 }
2249 2249
2250 gfx::Size RenderViewImpl::GetSize() const { 2250 gfx::Size RenderViewImpl::GetSize() const {
2251 return size(); 2251 return size();
2252 } 2252 }
2253 2253
2254 float RenderViewImpl::GetDeviceScaleFactor() const {
2255 return device_scale_factor_;
2256 }
2257
2254 WebPreferences& RenderViewImpl::GetWebkitPreferences() { 2258 WebPreferences& RenderViewImpl::GetWebkitPreferences() {
2255 return webkit_preferences_; 2259 return webkit_preferences_;
2256 } 2260 }
2257 2261
2258 void RenderViewImpl::SetWebkitPreferences(const WebPreferences& preferences) { 2262 void RenderViewImpl::SetWebkitPreferences(const WebPreferences& preferences) {
2259 OnUpdateWebPreferences(preferences); 2263 OnUpdateWebPreferences(preferences);
2260 } 2264 }
2261 2265
2262 blink::WebView* RenderViewImpl::GetWebView() { 2266 blink::WebView* RenderViewImpl::GetWebView() {
2263 return webview(); 2267 return webview();
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
3724 if (IsUseZoomForDSFEnabled()) { 3728 if (IsUseZoomForDSFEnabled()) {
3725 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3729 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3726 } else { 3730 } else {
3727 webview()->setDeviceScaleFactor(device_scale_factor_); 3731 webview()->setDeviceScaleFactor(device_scale_factor_);
3728 } 3732 }
3729 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3733 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3730 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3734 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3731 } 3735 }
3732 3736
3733 } // namespace content 3737 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | third_party/WebKit/Source/web/DragClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698