| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 WindowManagerDelegate* window_manager_delegate = nullptr, | 106 WindowManagerDelegate* window_manager_delegate = nullptr, |
| 107 ui::mojom::WindowTreeClientRequest request = nullptr, | 107 ui::mojom::WindowTreeClientRequest request = nullptr, |
| 108 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr, | 108 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr, |
| 109 bool create_discardable_memory = true); | 109 bool create_discardable_memory = true); |
| 110 ~WindowTreeClient() override; | 110 ~WindowTreeClient() override; |
| 111 | 111 |
| 112 // Establishes the connection by way of the WindowTreeFactory. | 112 // Establishes the connection by way of the WindowTreeFactory. |
| 113 void ConnectViaWindowTreeFactory(); | 113 void ConnectViaWindowTreeFactory(); |
| 114 | 114 |
| 115 // Establishes the connection by way of WindowManagerWindowTreeFactory. | 115 // Establishes the connection by way of WindowManagerWindowTreeFactory. |
| 116 void ConnectAsWindowManager(); | 116 // If |dispatch_from_host| is true then event dispatch always happens from the |
| 117 // host. This is only useful if mus has a single client. |
| 118 void ConnectAsWindowManager(bool dispatch_from_host = false); |
| 117 | 119 |
| 118 service_manager::Connector* connector() { return connector_; } | 120 service_manager::Connector* connector() { return connector_; } |
| 119 ui::Gpu* gpu() { return gpu_.get(); } | 121 ui::Gpu* gpu() { return gpu_.get(); } |
| 120 CaptureSynchronizer* capture_synchronizer() { | 122 CaptureSynchronizer* capture_synchronizer() { |
| 121 return capture_synchronizer_.get(); | 123 return capture_synchronizer_.get(); |
| 122 } | 124 } |
| 123 FocusSynchronizer* focus_synchronizer() { return focus_synchronizer_.get(); } | 125 FocusSynchronizer* focus_synchronizer() { return focus_synchronizer_.get(); } |
| 124 | 126 |
| 125 bool connected() const { return tree_ != nullptr; } | 127 bool connected() const { return tree_ != nullptr; } |
| 126 ClientSpecificId client_id() const { return client_id_; } | 128 ClientSpecificId client_id() const { return client_id_; } |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> | 603 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> |
| 602 discardable_shared_memory_manager_; | 604 discardable_shared_memory_manager_; |
| 603 | 605 |
| 604 // If |compositor_context_factory_| is installed on Env, then this is the | 606 // If |compositor_context_factory_| is installed on Env, then this is the |
| 605 // ContextFactory that was set on Env originally. | 607 // ContextFactory that was set on Env originally. |
| 606 ui::ContextFactory* initial_context_factory_ = nullptr; | 608 ui::ContextFactory* initial_context_factory_ = nullptr; |
| 607 | 609 |
| 608 // Set to true once OnWmDisplayAdded() is called. | 610 // Set to true once OnWmDisplayAdded() is called. |
| 609 bool got_initial_displays_ = false; | 611 bool got_initial_displays_ = false; |
| 610 | 612 |
| 613 // See ConnectAsWindowManager() for details. |
| 614 bool dispatch_from_host_ = false; |
| 615 |
| 611 base::WeakPtrFactory<WindowTreeClient> weak_factory_; | 616 base::WeakPtrFactory<WindowTreeClient> weak_factory_; |
| 612 | 617 |
| 613 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); | 618 DISALLOW_COPY_AND_ASSIGN(WindowTreeClient); |
| 614 }; | 619 }; |
| 615 | 620 |
| 616 } // namespace aura | 621 } // namespace aura |
| 617 | 622 |
| 618 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ | 623 #endif // UI_AURA_MUS_WINDOW_TREE_CLIENT_H_ |
| OLD | NEW |