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

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

Issue 2322613002: Adds support for multiple displays to WmTestBase (Closed)
Patch Set: moar Created 4 years, 3 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
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void AddAcceleratorHandler(uint16_t id_namespace, 87 void AddAcceleratorHandler(uint16_t id_namespace,
88 AcceleratorHandler* handler); 88 AcceleratorHandler* handler);
89 void RemoveAcceleratorHandler(uint16_t id_namespace); 89 void RemoveAcceleratorHandler(uint16_t id_namespace);
90 90
91 void AddObserver(WindowManagerObserver* observer); 91 void AddObserver(WindowManagerObserver* observer);
92 void RemoveObserver(WindowManagerObserver* observer); 92 void RemoveObserver(WindowManagerObserver* observer);
93 93
94 private: 94 private:
95 friend class WmTestHelper; 95 friend class WmTestHelper;
96 96
97 using RootWindowControllers = std::set<std::unique_ptr<RootWindowController>>;
98
97 RootWindowController* CreateRootWindowController( 99 RootWindowController* CreateRootWindowController(
98 ui::Window* window, 100 ui::Window* window,
99 const display::Display& display); 101 const display::Display& display);
100 102
103 // Removes a Display by window.
msw 2016/09/12 22:01:51 nit: "Removes a Display with the given [root] wind
sky 2016/09/12 23:11:28 I ended up renaming this to DestroyRootWindowContr
104 void RemoveDisplay(ui::Window* window);
105
101 void Shutdown(); 106 void Shutdown();
102 107
108 // Returns an iterator into |root_window_controllers_|. Returns
109 // root_window_controllers_.end() if |window| is not the root of a
110 // RootWindowController.
111 RootWindowControllers::iterator FindRootWindowControllerByWindow(
112 ui::Window* window);
113
103 // ui::WindowObserver: 114 // ui::WindowObserver:
104 void OnWindowDestroying(ui::Window* window) override; 115 void OnWindowDestroying(ui::Window* window) override;
105 void OnWindowDestroyed(ui::Window* window) override; 116 void OnWindowDestroyed(ui::Window* window) override;
106 117
107 // WindowTreeClientDelegate: 118 // WindowTreeClientDelegate:
108 void OnEmbed(ui::Window* root) override; 119 void OnEmbed(ui::Window* root) override;
109 void OnEmbedRootDestroyed(ui::Window* root) override; 120 void OnEmbedRootDestroyed(ui::Window* root) override;
110 void OnLostConnection(ui::WindowTreeClient* client) override; 121 void OnLostConnection(ui::WindowTreeClient* client) override;
111 void OnPointerEventObserved(const ui::PointerEvent& event, 122 void OnPointerEventObserved(const ui::PointerEvent& event,
112 ui::Window* target) override; 123 ui::Window* target) override;
(...skipping 23 matching lines...) Expand all
136 147
137 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; 148 std::unique_ptr<ui::WindowTreeClient> window_tree_client_;
138 149
139 ui::WindowManagerClient* window_manager_client_ = nullptr; 150 ui::WindowManagerClient* window_manager_client_ = nullptr;
140 151
141 std::unique_ptr<views::PointerWatcherEventRouter> 152 std::unique_ptr<views::PointerWatcherEventRouter>
142 pointer_watcher_event_router_; 153 pointer_watcher_event_router_;
143 154
144 std::unique_ptr<ShadowController> shadow_controller_; 155 std::unique_ptr<ShadowController> shadow_controller_;
145 156
146 std::set<std::unique_ptr<RootWindowController>> root_window_controllers_; 157 RootWindowControllers root_window_controllers_;
147 158
148 base::ObserverList<WindowManagerObserver> observers_; 159 base::ObserverList<WindowManagerObserver> observers_;
149 160
150 std::unique_ptr<display::ScreenBase> screen_; 161 std::unique_ptr<display::ScreenBase> screen_;
151 162
152 std::unique_ptr<WmShellMus> shell_; 163 std::unique_ptr<WmShellMus> shell_;
153 164
154 std::unique_ptr<WmLookupMus> lookup_; 165 std::unique_ptr<WmLookupMus> lookup_;
155 166
156 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_; 167 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_;
157 uint16_t next_accelerator_namespace_id_ = 0u; 168 uint16_t next_accelerator_namespace_id_ = 0u;
158 169
159 DISALLOW_COPY_AND_ASSIGN(WindowManager); 170 DISALLOW_COPY_AND_ASSIGN(WindowManager);
160 }; 171 };
161 172
162 } // namespace mus 173 } // namespace mus
163 } // namespace ash 174 } // namespace ash
164 175
165 #endif // ASH_MUS_WINDOW_MANAGER_H_ 176 #endif // ASH_MUS_WINDOW_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698