| 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 UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ |
| 6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ | 6 #define UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 class MusContextFactory; | 58 class MusContextFactory; |
| 59 class WindowMus; | 59 class WindowMus; |
| 60 class WindowPortMus; | 60 class WindowPortMus; |
| 61 struct WindowPortPropertyData; | 61 struct WindowPortPropertyData; |
| 62 class WindowTreeClientDelegate; | 62 class WindowTreeClientDelegate; |
| 63 class WindowTreeClientPrivate; | 63 class WindowTreeClientPrivate; |
| 64 class WindowTreeClientObserver; | 64 class WindowTreeClientObserver; |
| 65 class WindowTreeClientTestObserver; | 65 class WindowTreeClientTestObserver; |
| 66 class WindowTreeHostMus; | 66 class WindowTreeHostMus; |
| 67 | 67 |
| 68 namespace client { | |
| 69 class CaptureClient; | |
| 70 } | |
| 71 | |
| 72 using EventResultCallback = base::Callback<void(ui::mojom::EventResult)>; | 68 using EventResultCallback = base::Callback<void(ui::mojom::EventResult)>; |
| 73 | 69 |
| 74 // Manages the connection with mus. | 70 // Manages the connection with mus. |
| 75 // | 71 // |
| 76 // WindowTreeClient is owned by the creator. Generally when the delegate gets | 72 // WindowTreeClient is owned by the creator. Generally when the delegate gets |
| 77 // one of OnEmbedRootDestroyed() or OnLostConnection() it should delete the | 73 // one of OnEmbedRootDestroyed() or OnLostConnection() it should delete the |
| 78 // WindowTreeClient. | 74 // WindowTreeClient. |
| 79 // | 75 // |
| 80 // When WindowTreeClient is deleted all windows are deleted (and observers | 76 // When WindowTreeClient is deleted all windows are deleted (and observers |
| 81 // notified). | 77 // notified). |
| (...skipping 20 matching lines...) Expand all Loading... |
| 102 | 98 |
| 103 // Establishes the connection by way of WindowManagerWindowTreeFactory. | 99 // Establishes the connection by way of WindowManagerWindowTreeFactory. |
| 104 void ConnectAsWindowManager(); | 100 void ConnectAsWindowManager(); |
| 105 | 101 |
| 106 service_manager::Connector* connector() { return connector_; } | 102 service_manager::Connector* connector() { return connector_; } |
| 107 ui::Gpu* gpu() { return gpu_.get(); } | 103 ui::Gpu* gpu() { return gpu_.get(); } |
| 108 | 104 |
| 109 bool connected() const { return tree_ != nullptr; } | 105 bool connected() const { return tree_ != nullptr; } |
| 110 ClientSpecificId client_id() const { return client_id_; } | 106 ClientSpecificId client_id() const { return client_id_; } |
| 111 | 107 |
| 112 client::CaptureClient* GetCaptureClient(); | |
| 113 | |
| 114 void SetCanFocus(Window* window, bool can_focus); | 108 void SetCanFocus(Window* window, bool can_focus); |
| 115 void SetCanAcceptDrops(Id window_id, bool can_accept_drops); | 109 void SetCanAcceptDrops(Id window_id, bool can_accept_drops); |
| 116 void SetCanAcceptEvents(Id window_id, bool can_accept_events); | 110 void SetCanAcceptEvents(Id window_id, bool can_accept_events); |
| 117 void SetPredefinedCursor(WindowMus* window, | 111 void SetPredefinedCursor(WindowMus* window, |
| 118 ui::mojom::Cursor old_cursor, | 112 ui::mojom::Cursor old_cursor, |
| 119 ui::mojom::Cursor new_cursor); | 113 ui::mojom::Cursor new_cursor); |
| 120 void SetWindowTextInputState(WindowMus* window, | 114 void SetWindowTextInputState(WindowMus* window, |
| 121 mojo::TextInputStatePtr state); | 115 mojo::TextInputStatePtr state); |
| 122 void SetImeVisibility(WindowMus* window, | 116 void SetImeVisibility(WindowMus* window, |
| 123 bool visible, | 117 bool visible, |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 std::unique_ptr<ui::Gpu> gpu_; | 538 std::unique_ptr<ui::Gpu> gpu_; |
| 545 std::unique_ptr<MusContextFactory> compositor_context_factory_; | 539 std::unique_ptr<MusContextFactory> compositor_context_factory_; |
| 546 base::WeakPtrFactory<WindowTreeClient> weak_factory_; | 540 base::WeakPtrFactory<WindowTreeClient> weak_factory_; |
| 547 | 541 |
| 548 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); | 542 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); |
| 549 }; | 543 }; |
| 550 | 544 |
| 551 } // namespace aura | 545 } // namespace aura |
| 552 | 546 |
| 553 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ | 547 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ |
| OLD | NEW |