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

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

Issue 2858563002: Revert of chromeos: Makes mushrome use simplified display management (Closed)
Patch Set: 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 // Set |show_primary_host_on_connect| to true if the initial display should 71 WindowManager(service_manager::Connector* connector, Config config);
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);
76 ~WindowManager() override; 72 ~WindowManager() override;
77 73
78 void Init(std::unique_ptr<aura::WindowTreeClient> window_tree_client, 74 void Init(std::unique_ptr<aura::WindowTreeClient> window_tree_client,
79 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool, 75 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool,
80 std::unique_ptr<ash::ShellDelegate> shell_delegate = nullptr); 76 std::unique_ptr<ash::ShellDelegate> shell_delegate = nullptr);
81 77
82 // Sets the callback that is run once the connection to mus is lost. If not 78 // Sets the callback that is run once the connection to mus is lost. If not
83 // set shutdown occurs when the connection is lost (the Shell is deleted). 79 // set shutdown occurs when the connection is lost (the Shell is deleted).
84 void SetLostConnectionCallback(base::OnceClosure closure); 80 void SetLostConnectionCallback(base::OnceClosure closure);
85 81
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 const gfx::Insets& insets, 195 const gfx::Insets& insets,
200 const std::vector<gfx::Rect>& additional_client_areas) override; 196 const std::vector<gfx::Rect>& additional_client_areas) override;
201 bool IsWindowActive(aura::Window* window) override; 197 bool IsWindowActive(aura::Window* window) override;
202 void OnWmDeactivateWindow(aura::Window* window) override; 198 void OnWmDeactivateWindow(aura::Window* window) override;
203 199
204 service_manager::Connector* connector_; 200 service_manager::Connector* connector_;
205 display::mojom::DisplayControllerPtr display_controller_; 201 display::mojom::DisplayControllerPtr display_controller_;
206 202
207 const Config config_; 203 const Config config_;
208 204
209 const bool show_primary_host_on_connect_;
210
211 base::OnceClosure lost_connection_callback_; 205 base::OnceClosure lost_connection_callback_;
212 206
213 std::unique_ptr<::wm::WMState> wm_state_; 207 std::unique_ptr<::wm::WMState> wm_state_;
214 std::unique_ptr<aura::PropertyConverter> property_converter_; 208 std::unique_ptr<aura::PropertyConverter> property_converter_;
215 209
216 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; 210 std::unique_ptr<aura::WindowTreeClient> window_tree_client_;
217 211
218 aura::WindowManagerClient* window_manager_client_ = nullptr; 212 aura::WindowManagerClient* window_manager_client_ = nullptr;
219 213
220 std::unique_ptr<views::PointerWatcherEventRouter> 214 std::unique_ptr<views::PointerWatcherEventRouter>
(...skipping 23 matching lines...) Expand all
244 238
245 std::unique_ptr<ui::InputDeviceClient> input_device_client_; 239 std::unique_ptr<ui::InputDeviceClient> input_device_client_;
246 240
247 DISALLOW_COPY_AND_ASSIGN(WindowManager); 241 DISALLOW_COPY_AND_ASSIGN(WindowManager);
248 }; 242 };
249 243
250 } // namespace mus 244 } // namespace mus
251 } // namespace ash 245 } // namespace ash
252 246
253 #endif // ASH_MUS_WINDOW_MANAGER_H_ 247 #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