| OLD | NEW |
| 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 SERVICES_UI_WS_WINDOW_SERVER_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_SERVER_H_ |
| 6 #define SERVICES_UI_WS_WINDOW_SERVER_H_ | 6 #define SERVICES_UI_WS_WINDOW_SERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set() { | 136 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set() { |
| 137 return &window_manager_window_tree_factory_set_; | 137 return &window_manager_window_tree_factory_set_; |
| 138 } | 138 } |
| 139 | 139 |
| 140 // Sets focus to |window|. Returns true if |window| already has focus, or | 140 // Sets focus to |window|. Returns true if |window| already has focus, or |
| 141 // focus was successfully changed. Returns |false| if |window| is not a valid | 141 // focus was successfully changed. Returns |false| if |window| is not a valid |
| 142 // window to receive focus. | 142 // window to receive focus. |
| 143 bool SetFocusedWindow(ServerWindow* window); | 143 bool SetFocusedWindow(ServerWindow* window); |
| 144 ServerWindow* GetFocusedWindow(); | 144 ServerWindow* GetFocusedWindow(); |
| 145 | 145 |
| 146 bool is_in_high_contrast_mode() const { return is_in_high_contrast_mode_; } |
| 147 void SetHighContrastMode(bool enabled); |
| 148 |
| 146 // Returns a change id for the window manager that is associated with | 149 // Returns a change id for the window manager that is associated with |
| 147 // |source| and |client_change_id|. When the window manager replies | 150 // |source| and |client_change_id|. When the window manager replies |
| 148 // WindowManagerChangeCompleted() is called to obtain the original source | 151 // WindowManagerChangeCompleted() is called to obtain the original source |
| 149 // and client supplied change_id that initiated the called. | 152 // and client supplied change_id that initiated the called. |
| 150 uint32_t GenerateWindowManagerChangeId(WindowTree* source, | 153 uint32_t GenerateWindowManagerChangeId(WindowTree* source, |
| 151 uint32_t client_change_id); | 154 uint32_t client_change_id); |
| 152 | 155 |
| 153 // Called when a response from the window manager is obtained. Calls to | 156 // Called when a response from the window manager is obtained. Calls to |
| 154 // the client that initiated the change with the change id originally | 157 // the client that initiated the change with the change id originally |
| 155 // supplied by the client. | 158 // supplied by the client. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 std::unique_ptr<CurrentMoveLoopState> current_move_loop_; | 329 std::unique_ptr<CurrentMoveLoopState> current_move_loop_; |
| 327 | 330 |
| 328 // Set of WindowTrees. | 331 // Set of WindowTrees. |
| 329 WindowTreeMap tree_map_; | 332 WindowTreeMap tree_map_; |
| 330 | 333 |
| 331 // If non-null then we're processing a client operation. The Operation is | 334 // If non-null then we're processing a client operation. The Operation is |
| 332 // not owned by us (it's created on the stack by WindowTree). | 335 // not owned by us (it's created on the stack by WindowTree). |
| 333 Operation* current_operation_; | 336 Operation* current_operation_; |
| 334 | 337 |
| 335 bool in_destructor_; | 338 bool in_destructor_; |
| 339 bool is_in_high_contrast_mode_ = false; |
| 336 | 340 |
| 337 // Maps from window manager change id to the client that initiated the | 341 // Maps from window manager change id to the client that initiated the |
| 338 // request. | 342 // request. |
| 339 InFlightWindowManagerChangeMap in_flight_wm_change_map_; | 343 InFlightWindowManagerChangeMap in_flight_wm_change_map_; |
| 340 | 344 |
| 341 // Next id supplied to the window manager. | 345 // Next id supplied to the window manager. |
| 342 uint32_t next_wm_change_id_; | 346 uint32_t next_wm_change_id_; |
| 343 | 347 |
| 344 base::Callback<void(ServerWindow*)> window_paint_callback_; | 348 base::Callback<void(ServerWindow*)> window_paint_callback_; |
| 345 | 349 |
| 346 UserActivityMonitorMap activity_monitor_map_; | 350 UserActivityMonitorMap activity_monitor_map_; |
| 347 | 351 |
| 348 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; | 352 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; |
| 349 | 353 |
| 350 DISALLOW_COPY_AND_ASSIGN(WindowServer); | 354 DISALLOW_COPY_AND_ASSIGN(WindowServer); |
| 351 }; | 355 }; |
| 352 | 356 |
| 353 } // namespace ws | 357 } // namespace ws |
| 354 } // namespace ui | 358 } // namespace ui |
| 355 | 359 |
| 356 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ | 360 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ |
| OLD | NEW |