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

Side by Side Diff: mash/wm/root_window_controller.h

Issue 2010473003: Wires up shelf to panel and dock layoutmanagers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 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 | « mash/wm/bridge/wm_root_window_controller_mus.cc ('k') | mash/wm/root_window_controller.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 MASH_WM_ROOT_WINDOW_CONTROLLER_H_ 5 #ifndef MASH_WM_ROOT_WINDOW_CONTROLLER_H_
6 #define MASH_WM_ROOT_WINDOW_CONTROLLER_H_ 6 #define MASH_WM_ROOT_WINDOW_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "components/mus/public/cpp/window_observer.h" 10 #include "components/mus/public/cpp/window_observer.h"
11 #include "components/mus/public/cpp/window_tree_delegate.h" 11 #include "components/mus/public/cpp/window_tree_delegate.h"
12 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" 12 #include "components/mus/public/interfaces/window_manager_constants.mojom.h"
13 #include "components/mus/public/interfaces/window_tree_host.mojom.h" 13 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
14 #include "mash/wm/public/interfaces/container.mojom.h" 14 #include "mash/wm/public/interfaces/container.mojom.h"
15 #include "mash/wm/shelf_layout_manager_delegate.h"
15 #include "mojo/public/cpp/bindings/binding.h" 16 #include "mojo/public/cpp/bindings/binding.h"
16 #include "ui/display/display.h" 17 #include "ui/display/display.h"
17 18
18 namespace ash { 19 namespace ash {
19 class AlwaysOnTopController; 20 class AlwaysOnTopController;
20 } 21 }
21 22
22 namespace mus { 23 namespace mus {
23 class WindowManagerClient; 24 class WindowManagerClient;
24 } 25 }
(...skipping 18 matching lines...) Expand all
43 class WmRootWindowControllerMus; 44 class WmRootWindowControllerMus;
44 class WmShelfMus; 45 class WmShelfMus;
45 class WmTestBase; 46 class WmTestBase;
46 class WmTestHelper; 47 class WmTestHelper;
47 48
48 // RootWindowController manages the windows and state for a single display. 49 // RootWindowController manages the windows and state for a single display.
49 // 50 //
50 // RootWindowController deletes itself when the root mus::Window is destroyed. 51 // RootWindowController deletes itself when the root mus::Window is destroyed.
51 // You can trigger deletion explicitly by way of Destroy(). 52 // You can trigger deletion explicitly by way of Destroy().
52 class RootWindowController : public mus::WindowObserver, 53 class RootWindowController : public mus::WindowObserver,
53 public mus::WindowTreeDelegate { 54 public mus::WindowTreeDelegate,
55 public ShelfLayoutManagerDelegate {
54 public: 56 public:
55 static RootWindowController* CreateFromDisplay( 57 static RootWindowController* CreateFromDisplay(
56 WindowManagerApplication* app, 58 WindowManagerApplication* app,
57 mus::mojom::DisplayPtr display, 59 mus::mojom::DisplayPtr display,
58 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request); 60 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request);
59 61
60 // Deletes this. 62 // Deletes this.
61 void Destroy(); 63 void Destroy();
62 64
63 shell::Connector* GetConnector(); 65 shell::Connector* GetConnector();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void AddAccelerators(); 99 void AddAccelerators();
98 100
99 // WindowTreeDelegate: 101 // WindowTreeDelegate:
100 void OnEmbed(mus::Window* root) override; 102 void OnEmbed(mus::Window* root) override;
101 void OnConnectionLost(mus::WindowTreeConnection* connection) override; 103 void OnConnectionLost(mus::WindowTreeConnection* connection) override;
102 void OnEventObserved(const ui::Event& event, mus::Window* target) override; 104 void OnEventObserved(const ui::Event& event, mus::Window* target) override;
103 105
104 // mus::WindowObserver: 106 // mus::WindowObserver:
105 void OnWindowDestroyed(mus::Window* window) override; 107 void OnWindowDestroyed(mus::Window* window) override;
106 108
109 // ShelfLayoutManagerDelegate:
110 void OnShelfWindowAvailable() override;
111
107 // Sets up the window containers used for z-space management. 112 // Sets up the window containers used for z-space management.
108 void CreateContainer(mash::wm::mojom::Container container, 113 void CreateContainer(mash::wm::mojom::Container container,
109 mash::wm::mojom::Container parent_container); 114 mash::wm::mojom::Container parent_container);
110 void CreateContainers(); 115 void CreateContainers();
111 116
112 WindowManagerApplication* app_; 117 WindowManagerApplication* app_;
113 mus::Window* root_; 118 mus::Window* root_;
114 int window_count_; 119 int window_count_;
115 120
116 std::unique_ptr<WmRootWindowControllerMus> wm_root_window_controller_; 121 std::unique_ptr<WmRootWindowControllerMus> wm_root_window_controller_;
117 std::unique_ptr<WmShelfMus> wm_shelf_; 122 std::unique_ptr<WmShelfMus> wm_shelf_;
118 123
119 std::unique_ptr<WindowManager> window_manager_; 124 std::unique_ptr<WindowManager> window_manager_;
120 125
121 std::map<mus::Window*, std::unique_ptr<LayoutManager>> layout_managers_; 126 std::map<mus::Window*, std::unique_ptr<LayoutManager>> layout_managers_;
122 127
123 std::unique_ptr<ShadowController> shadow_controller_; 128 std::unique_ptr<ShadowController> shadow_controller_;
124 129
125 display::Display display_; 130 display::Display display_;
126 131
127 std::unique_ptr<ash::AlwaysOnTopController> always_on_top_controller_; 132 std::unique_ptr<ash::AlwaysOnTopController> always_on_top_controller_;
128 133
129 DISALLOW_COPY_AND_ASSIGN(RootWindowController); 134 DISALLOW_COPY_AND_ASSIGN(RootWindowController);
130 }; 135 };
131 136
132 } // namespace wm 137 } // namespace wm
133 } // namespace mash 138 } // namespace mash
134 139
135 #endif // MASH_WM_ROOT_WINDOW_CONTROLLER_H_ 140 #endif // MASH_WM_ROOT_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « mash/wm/bridge/wm_root_window_controller_mus.cc ('k') | mash/wm/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698