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

Unified Diff: ui/ozone/platform/dri/dri_cursor.h

Issue 556073003: [Ozone-DRI] Do proper bounds checks when moving the cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@restore-cursor
Patch Set: Cache window Created 6 years, 3 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/ozone/platform/dri/dri_cursor.h
diff --git a/ui/ozone/platform/dri/dri_cursor.h b/ui/ozone/platform/dri/dri_cursor.h
index ece6b423138bd862e1b701faa88507b24d318046..122be7e5a518e94b0121e825ac5ac8f08a2291ab 100644
--- a/ui/ozone/platform/dri/dri_cursor.h
+++ b/ui/ozone/platform/dri/dri_cursor.h
@@ -19,11 +19,14 @@ namespace ui {
class BitmapCursorOzone;
class BitmapCursorFactoryOzone;
+class DriWindow;
+class DriWindowManager;
class HardwareCursorDelegate;
class DriCursor : public CursorDelegateEvdev {
public:
- explicit DriCursor(HardwareCursorDelegate* hardware);
+ explicit DriCursor(HardwareCursorDelegate* hardware,
+ DriWindowManager* window_manager);
virtual ~DriCursor();
void SetCursor(gfx::AcceleratedWidget widget, PlatformCursor platform_cursor);
@@ -45,11 +48,16 @@ class DriCursor : public CursorDelegateEvdev {
// The DRI implementation for setting the hardware cursor.
HardwareCursorDelegate* hardware_;
+ DriWindowManager* window_manager_; // Not owned.
+
// The current cursor bitmap.
scoped_refptr<BitmapCursorOzone> cursor_;
// The window under the cursor.
- gfx::AcceleratedWidget cursor_window_;
+ gfx::AcceleratedWidget cursor_widget_;
+
+ // The window associated with |cursor_widget_|.
+ DriWindow* cursor_window_;
// The location of the cursor within the window.
gfx::PointF cursor_location_;

Powered by Google App Engine
This is Rietveld 408576698