Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: ash/mus/window_manager.h

Issue 2840043003: chromeos: Makes mushrome use simplified display management (Closed)
Patch Set: merge Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/test/wm_test_helper.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 ASH_MUS_WINDOW_MANAGER_H_ 5 #ifndef ASH_MUS_WINDOW_MANAGER_H_
6 #define ASH_MUS_WINDOW_MANAGER_H_ 6 #define ASH_MUS_WINDOW_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 class AcceleratorHandler; 61 class AcceleratorHandler;
62 class WmTestHelper; 62 class WmTestHelper;
63 63
64 // WindowManager serves as the WindowManagerDelegate and 64 // WindowManager serves as the WindowManagerDelegate and
65 // WindowTreeClientDelegate for mash. WindowManager creates (and owns) 65 // WindowTreeClientDelegate for mash. WindowManager creates (and owns)
66 // a RootWindowController per Display. WindowManager takes ownership of 66 // a RootWindowController per Display. WindowManager takes ownership of
67 // the WindowTreeClient. 67 // the WindowTreeClient.
68 class WindowManager : public aura::WindowManagerDelegate, 68 class WindowManager : public aura::WindowManagerDelegate,
69 public aura::WindowTreeClientDelegate { 69 public aura::WindowTreeClientDelegate {
70 public: 70 public:
71 WindowManager(service_manager::Connector* connector, Config config); 71 // Set |show_primary_host_on_connect| to true if the initial display should
72 // be made visible. Generally tests should use false, other places use true.
73 WindowManager(service_manager::Connector* connector,
74 Config config,
75 bool show_primary_host_on_connect);
72 ~WindowManager() override; 76 ~WindowManager() override;
73 77
74 void Init(std::unique_ptr<aura::WindowTreeClient> window_tree_client, 78 void Init(std::unique_ptr<aura::WindowTreeClient> window_tree_client,
75 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool, 79 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool,
76 std::unique_ptr<ash::ShellDelegate> shell_delegate = nullptr); 80 std::unique_ptr<ash::ShellDelegate> shell_delegate = nullptr);
77 81
78 // Sets the callback that is run once the connection to mus is lost. If not 82 // Sets the callback that is run once the connection to mus is lost. If not
79 // set shutdown occurs when the connection is lost (the Shell is deleted). 83 // set shutdown occurs when the connection is lost (the Shell is deleted).
80 void SetLostConnectionCallback(base::OnceClosure closure); 84 void SetLostConnectionCallback(base::OnceClosure closure);
81 85
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 const gfx::Insets& insets, 199 const gfx::Insets& insets,
196 const std::vector<gfx::Rect>& additional_client_areas) override; 200 const std::vector<gfx::Rect>& additional_client_areas) override;
197 bool IsWindowActive(aura::Window* window) override; 201 bool IsWindowActive(aura::Window* window) override;
198 void OnWmDeactivateWindow(aura::Window* window) override; 202 void OnWmDeactivateWindow(aura::Window* window) override;
199 203
200 service_manager::Connector* connector_; 204 service_manager::Connector* connector_;
201 display::mojom::DisplayControllerPtr display_controller_; 205 display::mojom::DisplayControllerPtr display_controller_;
202 206
203 const Config config_; 207 const Config config_;
204 208
209 const bool show_primary_host_on_connect_;
210
205 base::OnceClosure lost_connection_callback_; 211 base::OnceClosure lost_connection_callback_;
206 212
207 std::unique_ptr<::wm::WMState> wm_state_; 213 std::unique_ptr<::wm::WMState> wm_state_;
208 std::unique_ptr<aura::PropertyConverter> property_converter_; 214 std::unique_ptr<aura::PropertyConverter> property_converter_;
209 215
210 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; 216 std::unique_ptr<aura::WindowTreeClient> window_tree_client_;
211 217
212 aura::WindowManagerClient* window_manager_client_ = nullptr; 218 aura::WindowManagerClient* window_manager_client_ = nullptr;
213 219
214 std::unique_ptr<views::PointerWatcherEventRouter> 220 std::unique_ptr<views::PointerWatcherEventRouter>
(...skipping 23 matching lines...) Expand all
238 244
239 std::unique_ptr<ui::InputDeviceClient> input_device_client_; 245 std::unique_ptr<ui::InputDeviceClient> input_device_client_;
240 246
241 DISALLOW_COPY_AND_ASSIGN(WindowManager); 247 DISALLOW_COPY_AND_ASSIGN(WindowManager);
242 }; 248 };
243 249
244 } // namespace mus 250 } // namespace mus
245 } // namespace ash 251 } // namespace ash
246 252
247 #endif // ASH_MUS_WINDOW_MANAGER_H_ 253 #endif // ASH_MUS_WINDOW_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/mus/test/wm_test_helper.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698