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

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

Issue 2551573002: [Touch emulator] Update cursor when device scale factor changes. (Closed)
Patch Set: nit 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..6baee6e95c5f501652db5e870fe3a7a4acb2a281 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);
@@ -86,6 +90,7 @@ class CONTENT_EXPORT TouchEmulator : public ui::GestureProviderClient {
ui::GestureProviderConfigType gesture_provider_config_type_;
bool double_tap_enabled_;
+ bool use_2x_cursors_;
// While emulation is on, default cursor is touch. Pressing shift changes
// cursor to the pinch one.
WebCursor pointer_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