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

Side by Side Diff: services/ui/ws/display.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/cursor_state_unittest.cc ('k') | services/ui/ws/display.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_DISPLAY_H_ 5 #ifndef SERVICES_UI_WS_DISPLAY_H_
6 #define SERVICES_UI_WS_DISPLAY_H_ 6 #define SERVICES_UI_WS_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const ui::TextInputState& state); 142 const ui::TextInputState& state);
143 void SetImeVisibility(ServerWindow* window, bool visible); 143 void SetImeVisibility(ServerWindow* window, bool visible);
144 144
145 // Called just before |tree| is destroyed. 145 // Called just before |tree| is destroyed.
146 void OnWillDestroyTree(WindowTree* tree); 146 void OnWillDestroyTree(WindowTree* tree);
147 147
148 // Removes |display_root| from internal maps. This called prior to 148 // Removes |display_root| from internal maps. This called prior to
149 // |display_root| being destroyed. 149 // |display_root| being destroyed.
150 void RemoveWindowManagerDisplayRoot(WindowManagerDisplayRoot* display_root); 150 void RemoveWindowManagerDisplayRoot(WindowManagerDisplayRoot* display_root);
151 151
152 void UpdateNativeCursor(const ui::CursorData& cursor); 152 // Sets the native cursor to |cursor|.
153 void SetNativeCursor(const ui::CursorData& curosor);
153 154
154 // mojom::WindowTreeHost: 155 // mojom::WindowTreeHost:
155 void SetSize(const gfx::Size& size) override; 156 void SetSize(const gfx::Size& size) override;
156 void SetTitle(const std::string& title) override; 157 void SetTitle(const std::string& title) override;
157 158
158 // Updates the size of display root ServerWindow and WM root ServerWindow(s). 159 // Updates the size of display root ServerWindow and WM root ServerWindow(s).
159 void OnViewportMetricsChanged(const display::ViewportMetrics& metrics); 160 void OnViewportMetricsChanged(const display::ViewportMetrics& metrics);
160 161
161 // Returns the root window of the active user. 162 // Returns the root window of the active user.
162 ServerWindow* GetActiveRootWindow(); 163 ServerWindow* GetActiveRootWindow();
163 164
164 private: 165 private:
165 friend class test::DisplayTestApi; 166 friend class test::DisplayTestApi;
166 167
167 using WindowManagerDisplayRootMap = 168 using WindowManagerDisplayRootMap =
168 std::map<UserId, WindowManagerDisplayRoot*>; 169 std::map<UserId, WindowManagerDisplayRoot*>;
169 170
171 class CursorState;
172
170 // Inits the necessary state once the display is ready. 173 // Inits the necessary state once the display is ready.
171 void InitWindowManagerDisplayRoots(); 174 void InitWindowManagerDisplayRoots();
172 175
173 // Creates the set of WindowManagerDisplayRoots from the 176 // Creates the set of WindowManagerDisplayRoots from the
174 // WindowManagerWindowTreeFactorySet. 177 // WindowManagerWindowTreeFactorySet.
175 void CreateWindowManagerDisplayRootsFromFactories(); 178 void CreateWindowManagerDisplayRootsFromFactories();
176 179
177 void CreateWindowManagerDisplayRootFromFactory( 180 void CreateWindowManagerDisplayRootFromFactory(
178 WindowManagerWindowTreeFactory* factory); 181 WindowManagerWindowTreeFactory* factory);
179 182
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 std::unique_ptr<DisplayBinding> binding_; 214 std::unique_ptr<DisplayBinding> binding_;
212 WindowServer* const window_server_; 215 WindowServer* const window_server_;
213 std::unique_ptr<ServerWindow> root_; 216 std::unique_ptr<ServerWindow> root_;
214 std::unique_ptr<PlatformDisplay> platform_display_; 217 std::unique_ptr<PlatformDisplay> platform_display_;
215 std::unique_ptr<FocusController> focus_controller_; 218 std::unique_ptr<FocusController> focus_controller_;
216 219
217 // In internal window mode this contains information about the display. In 220 // In internal window mode this contains information about the display. In
218 // external window mode this will be invalid. 221 // external window mode this will be invalid.
219 display::Display display_; 222 display::Display display_;
220 223
221 // The last cursor set. Used to track whether we need to change the cursor.
222 ui::CursorData last_cursor_;
223
224 ServerWindowTracker activation_parents_; 224 ServerWindowTracker activation_parents_;
225 225
226 cc::LocalSurfaceIdAllocator allocator_; 226 cc::LocalSurfaceIdAllocator allocator_;
227 227
228 WindowManagerDisplayRootMap window_manager_display_root_map_; 228 WindowManagerDisplayRootMap window_manager_display_root_map_;
229 229
230 DISALLOW_COPY_AND_ASSIGN(Display); 230 DISALLOW_COPY_AND_ASSIGN(Display);
231 }; 231 };
232 232
233 } // namespace ws 233 } // namespace ws
234 } // namespace ui 234 } // namespace ui
235 235
236 #endif // SERVICES_UI_WS_DISPLAY_H_ 236 #endif // SERVICES_UI_WS_DISPLAY_H_
OLDNEW
« no previous file with comments | « services/ui/ws/cursor_state_unittest.cc ('k') | services/ui/ws/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698