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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 10697082: aura: Scale custom cursors appropriately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/glue/webcursor.h » ('j') | webkit/glue/webcursor_aurawin.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index e0e3c52ffd6abf3a5120f14f4b4c6dd605dff45a..2adb685b1f949d2db98c3437ca525c7c8f639593 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -344,6 +344,8 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
void RenderWidgetHostViewAura::UpdateCursor(const WebCursor& cursor) {
current_cursor_ = cursor;
+ const gfx::Display display = gfx::Screen::GetDisplayNearestWindow(window_);
+ current_cursor_.SetScaleFactor(display.device_scale_factor());
UpdateCursorIfOverSelf();
}
@@ -1175,6 +1177,7 @@ void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged(
backing_store->ScaleFactorChanged(device_scale_factor);
host_->SetDeviceScaleFactor(device_scale_factor);
+ current_cursor_.SetScaleFactor(device_scale_factor);
}
void RenderWidgetHostViewAura::OnWindowDestroying() {
« no previous file with comments | « no previous file | webkit/glue/webcursor.h » ('j') | webkit/glue/webcursor_aurawin.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698