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

Unified Diff: content/browser/renderer_host/input/touch_emulator.h

Issue 2551573002: [Touch emulator] Update cursor when device scale factor changes. (Closed)
Patch Set: other platforms Created 4 years 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 | content/browser/renderer_host/input/touch_emulator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touch_emulator.h
diff --git a/content/browser/renderer_host/input/touch_emulator.h b/content/browser/renderer_host/input/touch_emulator.h
index 187dee792f3d4a9d7ceb6b9cada176342c9f4a33..a73c37ca8d4a89feb45f85686f878cf4065c076c 100644
--- a/content/browser/renderer_host/input/touch_emulator.h
+++ b/content/browser/renderer_host/input/touch_emulator.h
@@ -27,6 +27,9 @@ class CONTENT_EXPORT TouchEmulator : public ui::GestureProviderClient {
void Enable(ui::GestureProviderConfigType config_type);
void Disable();
+ // Call when device scale factor changes.
+ void SetDeviceScaleFactor(float device_scale_factor);
+
// See GestureProvider::SetDoubleTapSupportForPageEnabled.
void SetDoubleTapSupportForPageEnabled(bool enabled);
@@ -57,6 +60,7 @@ class CONTENT_EXPORT TouchEmulator : public ui::GestureProviderClient {
// Returns cursor size in DIP.
gfx::SizeF InitCursorFromResource(
WebCursor* cursor, float scale, int resource_id);
+ bool InitCursors(float device_scale_factor, bool force);
void ResetState();
void UpdateCursor();
bool UpdateShiftPressed(bool shift_pressed);
@@ -88,6 +92,7 @@ class CONTENT_EXPORT TouchEmulator : public ui::GestureProviderClient {
// While emulation is on, default cursor is touch. Pressing shift changes
// cursor to the pinch one.
+ bool use_2x_cursors_;
tdresser 2016/12/05 16:55:01 Move up above comment?
dgozman 2016/12/05 18:56:32 Done.
WebCursor pointer_cursor_;
WebCursor touch_cursor_;
WebCursor pinch_cursor_;
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_emulator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698