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

Unified Diff: ui/aura/root_window.h

Issue 10388141: Full-screen Magnifier: Support warping the cursor on the edge (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make MagnificationController virtual class. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/root_window.h
diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h
index ae90f549f6ad93ea022c9aaa9beca0091bbdbe3d..813597cb70dd1e9fa19ba9e32f7976c30aea746e 100644
--- a/ui/aura/root_window.h
+++ b/ui/aura/root_window.h
@@ -98,6 +98,7 @@ class AURA_EXPORT RootWindow : public ui::CompositorDelegate,
Window* mouse_pressed_handler() { return mouse_pressed_handler_; }
Window* capture_window() { return capture_window_; }
Window* focused_window() { return focused_window_; }
+ ui::Layer* magnification_layer() { return magnification_layer_.get(); }
// Initializes the root window.
void Init();
@@ -121,6 +122,11 @@ class AURA_EXPORT RootWindow : public ui::CompositorDelegate,
// used.
void SetCursor(gfx::NativeCursor cursor);
+ // Hides the host cursor if true is set, regardless of ShowCursor(). This is
+ // used when chrome draws an alnative cursor instead. (cf. magnified cursor
piman 2012/05/18 03:09:49 nit: s/alnative/alternative/
+ // for accessibility)
piman 2012/05/18 03:09:49 nit: end with a period.
+ void SetForceHideCursor(bool hide);
+
// Shows or hides the cursor.
void ShowCursor(bool show);
@@ -351,6 +357,12 @@ class AURA_EXPORT RootWindow : public ui::CompositorDelegate,
scoped_ptr<RootWindowHost> host_;
+ // Layer for screen magnification. This layer doesn't transform location of
+ // mouse event. When the layer were transformed, the mouse pointer drawn by
+ // the host would indicate diffirent location and chrome should draw a
+ // software cursor instead of a hardware cursor by the host.
+ scoped_ptr<ui::Layer> magnification_layer_;
+
// If set before the RootWindow is created, the cursor will be drawn within
// the Aura root window but hidden outside of it, and it'll remain hidden
// after the Aura window is closed.
@@ -399,6 +411,8 @@ class AURA_EXPORT RootWindow : public ui::CompositorDelegate,
bool should_hold_mouse_moves_;
scoped_ptr<MouseEvent> held_mouse_move_;
+ bool force_hide_cursor_;
+
CompositorLock* compositor_lock_;
bool draw_on_compositor_unlock_;

Powered by Google App Engine
This is Rietveld 408576698