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

Side by Side Diff: services/ui/ws/window_manager_state.h

Issue 2857963003: Add {Lock,Unlock,Show,Hide}Cursor() to the window manager mojom. (Closed)
Patch Set: sky comments Created 3 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_manager_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ 5 #ifndef SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_
6 #define SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ 6 #define SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <queue> 11 #include <queue>
12 #include <string> 12 #include <string>
13 #include <unordered_map> 13 #include <unordered_map>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "services/ui/public/interfaces/display_manager.mojom.h" 18 #include "services/ui/public/interfaces/display_manager.mojom.h"
19 #include "services/ui/ws/cursor_state.h"
19 #include "services/ui/ws/event_dispatcher.h" 20 #include "services/ui/ws/event_dispatcher.h"
20 #include "services/ui/ws/event_dispatcher_delegate.h" 21 #include "services/ui/ws/event_dispatcher_delegate.h"
21 #include "services/ui/ws/server_window_observer.h" 22 #include "services/ui/ws/server_window_observer.h"
22 #include "services/ui/ws/user_id.h" 23 #include "services/ui/ws/user_id.h"
23 #include "services/ui/ws/window_server.h" 24 #include "services/ui/ws/window_server.h"
24 25
25 namespace ui { 26 namespace ui {
26 namespace ws { 27 namespace ws {
27 28
28 class DisplayManager; 29 class DisplayManager;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 84
84 // Returns the ServerWindow corresponding to an orphaned root with the 85 // Returns the ServerWindow corresponding to an orphaned root with the
85 // specified id. See |orphaned_window_manager_display_roots_| for details on 86 // specified id. See |orphaned_window_manager_display_roots_| for details on
86 // what on orphaned root is. 87 // what on orphaned root is.
87 ServerWindow* GetOrphanedRootWithId(const WindowId& id); 88 ServerWindow* GetOrphanedRootWithId(const WindowId& id);
88 89
89 // TODO(sky): EventDispatcher is really an implementation detail and should 90 // TODO(sky): EventDispatcher is really an implementation detail and should
90 // not be exposed. 91 // not be exposed.
91 EventDispatcher* event_dispatcher() { return &event_dispatcher_; } 92 EventDispatcher* event_dispatcher() { return &event_dispatcher_; }
92 93
94 CursorState& cursor_state() { return cursor_state_; }
95
93 // Returns true if this is the WindowManager of the active user. 96 // Returns true if this is the WindowManager of the active user.
94 bool IsActive() const; 97 bool IsActive() const;
95 98
96 void Activate(const gfx::Point& mouse_location_on_screen); 99 void Activate(const gfx::Point& mouse_location_on_screen);
97 void Deactivate(); 100 void Deactivate();
98 101
99 // Processes an event from PlatformDisplay. 102 // Processes an event from PlatformDisplay.
100 void ProcessEvent(const Event& event, int64_t display_id); 103 void ProcessEvent(const Event& event, int64_t display_id);
101 104
102 private: 105 private:
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // Id of the display the current event being processed originated from. 291 // Id of the display the current event being processed originated from.
289 int64_t event_processing_display_id_ = 0; 292 int64_t event_processing_display_id_ = 0;
290 293
291 // Set of WindowManagerDisplayRoots corresponding to Displays that have been 294 // Set of WindowManagerDisplayRoots corresponding to Displays that have been
292 // destroyed. WindowManagerDisplayRoots are not destroyed immediately when 295 // destroyed. WindowManagerDisplayRoots are not destroyed immediately when
293 // the Display is destroyed to allow the client to destroy the window when it 296 // the Display is destroyed to allow the client to destroy the window when it
294 // wants to. Once the client destroys the window WindowManagerDisplayRoots is 297 // wants to. Once the client destroys the window WindowManagerDisplayRoots is
295 // destroyed. 298 // destroyed.
296 WindowManagerDisplayRoots orphaned_window_manager_display_roots_; 299 WindowManagerDisplayRoots orphaned_window_manager_display_roots_;
297 300
301 // All state regarding what the current cursor is.
302 CursorState cursor_state_;
303
298 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); 304 DISALLOW_COPY_AND_ASSIGN(WindowManagerState);
299 }; 305 };
300 306
301 } // namespace ws 307 } // namespace ws
302 } // namespace ui 308 } // namespace ui
303 309
304 #endif // SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_ 310 #endif // SERVICES_UI_WS_WINDOW_MANAGER_STATE_H_
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_manager_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698