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

Side by Side Diff: ui/ozone/platform/dri/dri_window_manager.h

Issue 657603002: ash: ozone: apply transformation to events outside the root window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove explicit gfx::Rect to gfx::RectF conversion Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_ 6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 21 matching lines...) Expand all
32 // Removes the window association for |widget|. Note: |widget| must be 32 // Removes the window association for |widget|. Note: |widget| must be
33 // associated with a window when calling this function. 33 // associated with a window when calling this function.
34 void RemoveWindow(gfx::AcceleratedWidget widget); 34 void RemoveWindow(gfx::AcceleratedWidget widget);
35 35
36 // Returns the window associated with |widget|. Note: This function should 36 // Returns the window associated with |widget|. Note: This function should
37 // only be called if a valid window has been associated. 37 // only be called if a valid window has been associated.
38 DriWindow* GetWindow(gfx::AcceleratedWidget widget); 38 DriWindow* GetWindow(gfx::AcceleratedWidget widget);
39 39
40 DriCursor* cursor() const { return cursor_.get(); } 40 DriCursor* cursor() const { return cursor_.get(); }
41 41
42 // Tries to set a given widget as the recipient for events. It will
43 // fail if there is already another widget as recipient.
44 void GrabEvents(gfx::AcceleratedWidget widget);
45
46 // Unsets a given widget as the recipient for events.
47 void UngrabEvents(gfx::AcceleratedWidget widget);
48
49 // Gets the current widget recipient of mouse events.
50 gfx::AcceleratedWidget event_grabber() const { return event_grabber_; }
51
42 private: 52 private:
43 // Reset the cursor location based on the list of active windows. 53 // Reset the cursor location based on the list of active windows.
44 void ResetCursorLocation(); 54 void ResetCursorLocation();
45 55
46 typedef std::map<gfx::AcceleratedWidget, DriWindow*> WidgetToWindowMap; 56 typedef std::map<gfx::AcceleratedWidget, DriWindow*> WidgetToWindowMap;
47 57
48 gfx::AcceleratedWidget last_allocated_widget_; 58 gfx::AcceleratedWidget last_allocated_widget_;
49 WidgetToWindowMap window_map_; 59 WidgetToWindowMap window_map_;
50 60
51 scoped_ptr<DriCursor> cursor_; 61 scoped_ptr<DriCursor> cursor_;
52 62
63 gfx::AcceleratedWidget event_grabber_;
64
53 DISALLOW_COPY_AND_ASSIGN(DriWindowManager); 65 DISALLOW_COPY_AND_ASSIGN(DriWindowManager);
54 }; 66 };
55 67
56 } // namespace ui 68 } // namespace ui
57 69
58 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_ 70 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698