| 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_TREE_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_TREE_H_ |
| 6 #define SERVICES_UI_WS_WINDOW_TREE_H_ | 6 #define SERVICES_UI_WS_WINDOW_TREE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 void DispatchInputEvent(ServerWindow* target, const ui::Event& event); | 173 void DispatchInputEvent(ServerWindow* target, const ui::Event& event); |
| 174 | 174 |
| 175 bool IsWaitingForNewTopLevelWindow(uint32_t wm_change_id); | 175 bool IsWaitingForNewTopLevelWindow(uint32_t wm_change_id); |
| 176 void OnWindowManagerCreatedTopLevelWindow(uint32_t wm_change_id, | 176 void OnWindowManagerCreatedTopLevelWindow(uint32_t wm_change_id, |
| 177 uint32_t client_change_id, | 177 uint32_t client_change_id, |
| 178 const ServerWindow* window); | 178 const ServerWindow* window); |
| 179 void AddActivationParent(const ClientWindowId& window_id); | 179 void AddActivationParent(const ClientWindowId& window_id); |
| 180 | 180 |
| 181 // Calls through to the client. | 181 // Calls through to the client. |
| 182 void OnChangeCompleted(uint32_t change_id, bool success); | 182 void OnChangeCompleted(uint32_t change_id, bool success); |
| 183 void OnAccelerator(uint32_t accelerator_id, const ui::Event& event); | 183 // |state_to_ack| is the WindowManagerState to call through to when the ack |
| 184 // from the accelerator is received. If |needs_ack| is true an ack is |
| 185 // required. |
| 186 void OnAccelerator(uint32_t accelerator_id, |
| 187 const ui::Event& event, |
| 188 bool needs_ack); |
| 184 | 189 |
| 185 // Called when |tree|'s jankiness changes (see janky_ for definition). | 190 // Called when |tree|'s jankiness changes (see janky_ for definition). |
| 186 // Notifies the window manager client so it can update UI for the affected | 191 // Notifies the window manager client so it can update UI for the affected |
| 187 // window(s). | 192 // window(s). |
| 188 void ClientJankinessChanged(WindowTree* tree); | 193 void ClientJankinessChanged(WindowTree* tree); |
| 189 | 194 |
| 190 // The following methods are invoked after the corresponding change has been | 195 // The following methods are invoked after the corresponding change has been |
| 191 // processed. They do the appropriate bookkeeping and update the client as | 196 // processed. They do the appropriate bookkeeping and update the client as |
| 192 // necessary. | 197 // necessary. |
| 193 void ProcessWindowBoundsChanged(const ServerWindow* window, | 198 void ProcessWindowBoundsChanged(const ServerWindow* window, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 void NotifyDrawnStateChanged(const ServerWindow* window, | 324 void NotifyDrawnStateChanged(const ServerWindow* window, |
| 320 bool new_drawn_value); | 325 bool new_drawn_value); |
| 321 | 326 |
| 322 // Deletes all Windows we own. | 327 // Deletes all Windows we own. |
| 323 void DestroyWindows(); | 328 void DestroyWindows(); |
| 324 | 329 |
| 325 bool CanEmbed(const ClientWindowId& window_id) const; | 330 bool CanEmbed(const ClientWindowId& window_id) const; |
| 326 void PrepareForEmbed(ServerWindow* window); | 331 void PrepareForEmbed(ServerWindow* window); |
| 327 void RemoveChildrenAsPartOfEmbed(ServerWindow* window); | 332 void RemoveChildrenAsPartOfEmbed(ServerWindow* window); |
| 328 | 333 |
| 334 // Generates a new event id for an accelerator or event ack, sets it in |
| 335 // |event_ack_id_| and returns it. |
| 336 uint32_t GenerateEventAckId(); |
| 337 |
| 329 void DispatchInputEventImpl(ServerWindow* target, const ui::Event& event); | 338 void DispatchInputEventImpl(ServerWindow* target, const ui::Event& event); |
| 330 | 339 |
| 331 // Calls OnChangeCompleted() on the client. | 340 // Calls OnChangeCompleted() on the client. |
| 332 void NotifyChangeCompleted(uint32_t change_id, | 341 void NotifyChangeCompleted(uint32_t change_id, |
| 333 mojom::WindowManagerErrorCode error_code); | 342 mojom::WindowManagerErrorCode error_code); |
| 334 | 343 |
| 335 // WindowTree: | 344 // WindowTree: |
| 336 void NewWindow(uint32_t change_id, | 345 void NewWindow(uint32_t change_id, |
| 337 Id transport_window_id, | 346 Id transport_window_id, |
| 338 mojo::Map<mojo::String, mojo::Array<uint8_t>> | 347 mojo::Map<mojo::String, mojo::Array<uint8_t>> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 int32_t y_offset, | 429 int32_t y_offset, |
| 421 const gfx::Insets& hit_area) override; | 430 const gfx::Insets& hit_area) override; |
| 422 void WmResponse(uint32_t change_id, bool response) override; | 431 void WmResponse(uint32_t change_id, bool response) override; |
| 423 void WmRequestClose(Id transport_window_id) override; | 432 void WmRequestClose(Id transport_window_id) override; |
| 424 void WmSetFrameDecorationValues( | 433 void WmSetFrameDecorationValues( |
| 425 mojom::FrameDecorationValuesPtr values) override; | 434 mojom::FrameDecorationValuesPtr values) override; |
| 426 void WmSetNonClientCursor(uint32_t window_id, | 435 void WmSetNonClientCursor(uint32_t window_id, |
| 427 mojom::Cursor cursor_id) override; | 436 mojom::Cursor cursor_id) override; |
| 428 void OnWmCreatedTopLevelWindow(uint32_t change_id, | 437 void OnWmCreatedTopLevelWindow(uint32_t change_id, |
| 429 Id transport_window_id) override; | 438 Id transport_window_id) override; |
| 439 void OnAcceleratorAck(uint32_t event_id, mojom::EventResult result) override; |
| 430 | 440 |
| 431 // AccessPolicyDelegate: | 441 // AccessPolicyDelegate: |
| 432 bool HasRootForAccessPolicy(const ServerWindow* window) const override; | 442 bool HasRootForAccessPolicy(const ServerWindow* window) const override; |
| 433 bool IsWindowKnownForAccessPolicy(const ServerWindow* window) const override; | 443 bool IsWindowKnownForAccessPolicy(const ServerWindow* window) const override; |
| 434 bool IsWindowRootOfAnotherTreeForAccessPolicy( | 444 bool IsWindowRootOfAnotherTreeForAccessPolicy( |
| 435 const ServerWindow* window) const override; | 445 const ServerWindow* window) const override; |
| 436 | 446 |
| 437 WindowServer* window_server_; | 447 WindowServer* window_server_; |
| 438 | 448 |
| 439 UserId user_id_; | 449 UserId user_id_; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 waiting_for_top_level_window_info_; | 498 waiting_for_top_level_window_info_; |
| 489 bool embedder_intercepts_events_ = false; | 499 bool embedder_intercepts_events_ = false; |
| 490 | 500 |
| 491 DISALLOW_COPY_AND_ASSIGN(WindowTree); | 501 DISALLOW_COPY_AND_ASSIGN(WindowTree); |
| 492 }; | 502 }; |
| 493 | 503 |
| 494 } // namespace ws | 504 } // namespace ws |
| 495 } // namespace ui | 505 } // namespace ui |
| 496 | 506 |
| 497 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ | 507 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ |
| OLD | NEW |