| 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 COMPONENTS_MUS_WS_WINDOW_TREE_H_ | 5 #ifndef COMPONENTS_MUS_WS_WINDOW_TREE_H_ |
| 6 #define COMPONENTS_MUS_WS_WINDOW_TREE_H_ | 6 #define COMPONENTS_MUS_WS_WINDOW_TREE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 bool SetWindowOpacity(const ClientWindowId& window_id, float opacity); | 163 bool SetWindowOpacity(const ClientWindowId& window_id, float opacity); |
| 164 bool SetFocus(const ClientWindowId& window_id); | 164 bool SetFocus(const ClientWindowId& window_id); |
| 165 bool Embed(const ClientWindowId& window_id, | 165 bool Embed(const ClientWindowId& window_id, |
| 166 mojom::WindowTreeClientPtr client); | 166 mojom::WindowTreeClientPtr client); |
| 167 void DispatchInputEvent(ServerWindow* target, const ui::Event& event); | 167 void DispatchInputEvent(ServerWindow* target, const ui::Event& event); |
| 168 | 168 |
| 169 bool IsWaitingForNewTopLevelWindow(uint32_t wm_change_id); | 169 bool IsWaitingForNewTopLevelWindow(uint32_t wm_change_id); |
| 170 void OnWindowManagerCreatedTopLevelWindow(uint32_t wm_change_id, | 170 void OnWindowManagerCreatedTopLevelWindow(uint32_t wm_change_id, |
| 171 uint32_t client_change_id, | 171 uint32_t client_change_id, |
| 172 const ServerWindow* window); | 172 const ServerWindow* window); |
| 173 void OnMoveLoopCompleted(uint32_t client_change_id, bool completed); |
| 173 void AddActivationParent(const ClientWindowId& window_id); | 174 void AddActivationParent(const ClientWindowId& window_id); |
| 174 | 175 |
| 175 // Calls through to the client. | 176 // Calls through to the client. |
| 176 void OnChangeCompleted(uint32_t change_id, bool success); | 177 void OnChangeCompleted(uint32_t change_id, bool success); |
| 177 void OnAccelerator(uint32_t accelerator_id, const ui::Event& event); | 178 void OnAccelerator(uint32_t accelerator_id, const ui::Event& event); |
| 178 | 179 |
| 179 // Called when |tree|'s jankiness changes (see janky_ for definition). | 180 // Called when |tree|'s jankiness changes (see janky_ for definition). |
| 180 // Notifies the window manager client so it can update UI for the affected | 181 // Notifies the window manager client so it can update UI for the affected |
| 181 // window(s). | 182 // window(s). |
| 182 void ClientJankinessChanged(WindowTree* tree); | 183 void ClientJankinessChanged(WindowTree* tree); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 void SetClientArea( | 392 void SetClientArea( |
| 392 Id transport_window_id, | 393 Id transport_window_id, |
| 393 const gfx::Insets& insets, | 394 const gfx::Insets& insets, |
| 394 mojo::Array<gfx::Rect> transport_additional_client_areas) override; | 395 mojo::Array<gfx::Rect> transport_additional_client_areas) override; |
| 395 void SetHitTestMask(Id transport_window_id, const gfx::Rect& mask) override; | 396 void SetHitTestMask(Id transport_window_id, const gfx::Rect& mask) override; |
| 396 void GetWindowManagerClient( | 397 void GetWindowManagerClient( |
| 397 mojo::AssociatedInterfaceRequest<mojom::WindowManagerClient> internal) | 398 mojo::AssociatedInterfaceRequest<mojom::WindowManagerClient> internal) |
| 398 override; | 399 override; |
| 399 void GetCursorLocationMemory(const GetCursorLocationMemoryCallback& callback) | 400 void GetCursorLocationMemory(const GetCursorLocationMemoryCallback& callback) |
| 400 override; | 401 override; |
| 402 void PerformWindowMove(uint32_t change_id, |
| 403 Id window_id, |
| 404 const gfx::Point& cursor) override; |
| 405 void CancelWindowMove(Id window_id) override; |
| 401 | 406 |
| 402 // mojom::WindowManagerClient: | 407 // mojom::WindowManagerClient: |
| 403 void AddAccelerator(uint32_t id, | 408 void AddAccelerator(uint32_t id, |
| 404 mojom::EventMatcherPtr event_matcher, | 409 mojom::EventMatcherPtr event_matcher, |
| 405 const AddAcceleratorCallback& callback) override; | 410 const AddAcceleratorCallback& callback) override; |
| 406 void RemoveAccelerator(uint32_t id) override; | 411 void RemoveAccelerator(uint32_t id) override; |
| 407 void AddActivationParent(Id transport_window_id) override; | 412 void AddActivationParent(Id transport_window_id) override; |
| 408 void RemoveActivationParent(Id transport_window_id) override; | 413 void RemoveActivationParent(Id transport_window_id) override; |
| 409 void ActivateNextWindow() override; | 414 void ActivateNextWindow() override; |
| 410 void SetUnderlaySurfaceOffsetAndExtendedHitArea( | 415 void SetUnderlaySurfaceOffsetAndExtendedHitArea( |
| 411 Id window_id, | 416 Id window_id, |
| 412 int32_t x_offset, | 417 int32_t x_offset, |
| 413 int32_t y_offset, | 418 int32_t y_offset, |
| 414 const gfx::Insets& hit_area) override; | 419 const gfx::Insets& hit_area) override; |
| 415 void WmResponse(uint32_t change_id, bool response) override; | 420 void WmResponse(uint32_t change_id, bool response) override; |
| 416 void WmRequestClose(Id transport_window_id) override; | 421 void WmRequestClose(Id transport_window_id) override; |
| 417 void WmSetFrameDecorationValues( | 422 void WmSetFrameDecorationValues( |
| 418 mojom::FrameDecorationValuesPtr values) override; | 423 mojom::FrameDecorationValuesPtr values) override; |
| 419 void WmSetNonClientCursor(uint32_t window_id, | 424 void WmSetNonClientCursor(uint32_t window_id, |
| 420 mojom::Cursor cursor_id) override; | 425 mojom::Cursor cursor_id) override; |
| 421 void OnWmCreatedTopLevelWindow(uint32_t change_id, | 426 void OnWmCreatedTopLevelWindow(uint32_t change_id, |
| 422 Id transport_window_id) override; | 427 Id transport_window_id) override; |
| 428 void OnWmMoveLoopCompleted(uint32_t change_id, |
| 429 bool succeeded) override; |
| 423 | 430 |
| 424 // AccessPolicyDelegate: | 431 // AccessPolicyDelegate: |
| 425 bool HasRootForAccessPolicy(const ServerWindow* window) const override; | 432 bool HasRootForAccessPolicy(const ServerWindow* window) const override; |
| 426 bool IsWindowKnownForAccessPolicy(const ServerWindow* window) const override; | 433 bool IsWindowKnownForAccessPolicy(const ServerWindow* window) const override; |
| 427 bool IsWindowRootOfAnotherTreeForAccessPolicy( | 434 bool IsWindowRootOfAnotherTreeForAccessPolicy( |
| 428 const ServerWindow* window) const override; | 435 const ServerWindow* window) const override; |
| 429 | 436 |
| 430 WindowServer* window_server_; | 437 WindowServer* window_server_; |
| 431 | 438 |
| 432 UserId user_id_; | 439 UserId user_id_; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 std::unique_ptr<WaitingForTopLevelWindowInfo> | 487 std::unique_ptr<WaitingForTopLevelWindowInfo> |
| 481 waiting_for_top_level_window_info_; | 488 waiting_for_top_level_window_info_; |
| 482 | 489 |
| 483 DISALLOW_COPY_AND_ASSIGN(WindowTree); | 490 DISALLOW_COPY_AND_ASSIGN(WindowTree); |
| 484 }; | 491 }; |
| 485 | 492 |
| 486 } // namespace ws | 493 } // namespace ws |
| 487 } // namespace mus | 494 } // namespace mus |
| 488 | 495 |
| 489 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_H_ | 496 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_H_ |
| OLD | NEW |