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

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

Issue 2434923002: Handle modified displays in mustash. (Closed)
Patch Set: Fix PlatformScreenStub for tests. Created 4 years, 2 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/root_window_controller.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>
11 #include <set> 11 #include <set>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "services/ui/common/types.h" 16 #include "services/ui/common/types.h"
17 #include "services/ui/public/cpp/window_manager_delegate.h" 17 #include "services/ui/public/cpp/window_manager_delegate.h"
18 #include "services/ui/public/cpp/window_tree_client_delegate.h" 18 #include "services/ui/public/cpp/window_tree_client_delegate.h"
19 #include "services/ui/public/interfaces/display/display_controller.mojom.h"
19 #include "services/ui/public/interfaces/window_manager.mojom.h" 20 #include "services/ui/public/interfaces/window_manager.mojom.h"
20 21
21 namespace base { 22 namespace base {
22 class SequencedWorkerPool; 23 class SequencedWorkerPool;
23 } 24 }
24 25
25 namespace display { 26 namespace display {
26 class Display; 27 class Display;
27 class ScreenBase; 28 class ScreenBase;
28 } 29 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Returns the next accelerator namespace id by value in |id|. Returns true 85 // Returns the next accelerator namespace id by value in |id|. Returns true
85 // if there is another slot available, false if all slots are taken up. 86 // if there is another slot available, false if all slots are taken up.
86 bool GetNextAcceleratorNamespaceId(uint16_t* id); 87 bool GetNextAcceleratorNamespaceId(uint16_t* id);
87 void AddAcceleratorHandler(uint16_t id_namespace, 88 void AddAcceleratorHandler(uint16_t id_namespace,
88 AcceleratorHandler* handler); 89 AcceleratorHandler* handler);
89 void RemoveAcceleratorHandler(uint16_t id_namespace); 90 void RemoveAcceleratorHandler(uint16_t id_namespace);
90 91
91 void AddObserver(WindowManagerObserver* observer); 92 void AddObserver(WindowManagerObserver* observer);
92 void RemoveObserver(WindowManagerObserver* observer); 93 void RemoveObserver(WindowManagerObserver* observer);
93 94
95 // Returns the DisplayController interface if available. Will be null if no
96 // service_manager::Connector was available, for example in some tests.
97 display::mojom::DisplayController* GetDisplayController();
98
94 private: 99 private:
95 friend class WmTestHelper; 100 friend class WmTestHelper;
96 101
97 using RootWindowControllers = std::set<std::unique_ptr<RootWindowController>>; 102 using RootWindowControllers = std::set<std::unique_ptr<RootWindowController>>;
98 103
99 RootWindowController* CreateRootWindowController( 104 RootWindowController* CreateRootWindowController(
100 ui::Window* window, 105 ui::Window* window,
101 const display::Display& display); 106 const display::Display& display);
102 107
103 // Deletes the specified RootWindowController. Called when a display is 108 // Deletes the specified RootWindowController. Called when a display is
(...skipping 30 matching lines...) Expand all
134 ui::Window* window, 139 ui::Window* window,
135 const std::string& name, 140 const std::string& name,
136 std::unique_ptr<std::vector<uint8_t>>* new_data) override; 141 std::unique_ptr<std::vector<uint8_t>>* new_data) override;
137 ui::Window* OnWmCreateTopLevelWindow( 142 ui::Window* OnWmCreateTopLevelWindow(
138 std::map<std::string, std::vector<uint8_t>>* properties) override; 143 std::map<std::string, std::vector<uint8_t>>* properties) override;
139 void OnWmClientJankinessChanged(const std::set<ui::Window*>& client_windows, 144 void OnWmClientJankinessChanged(const std::set<ui::Window*>& client_windows,
140 bool not_responding) override; 145 bool not_responding) override;
141 void OnWmNewDisplay(ui::Window* window, 146 void OnWmNewDisplay(ui::Window* window,
142 const display::Display& display) override; 147 const display::Display& display) override;
143 void OnWmDisplayRemoved(ui::Window* window) override; 148 void OnWmDisplayRemoved(ui::Window* window) override;
149 void OnWmDisplayModified(const display::Display& display) override;
144 void OnWmPerformMoveLoop(ui::Window* window, 150 void OnWmPerformMoveLoop(ui::Window* window,
145 ui::mojom::MoveLoopSource source, 151 ui::mojom::MoveLoopSource source,
146 const gfx::Point& cursor_location, 152 const gfx::Point& cursor_location,
147 const base::Callback<void(bool)>& on_done) override; 153 const base::Callback<void(bool)>& on_done) override;
148 void OnWmCancelMoveLoop(ui::Window* window) override; 154 void OnWmCancelMoveLoop(ui::Window* window) override;
149 ui::mojom::EventResult OnAccelerator(uint32_t id, 155 ui::mojom::EventResult OnAccelerator(uint32_t id,
150 const ui::Event& event) override; 156 const ui::Event& event) override;
151 157
152 service_manager::Connector* connector_; 158 service_manager::Connector* connector_;
159 display::mojom::DisplayControllerPtr display_controller_;
153 160
154 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; 161 std::unique_ptr<ui::WindowTreeClient> window_tree_client_;
155 162
156 ui::WindowManagerClient* window_manager_client_ = nullptr; 163 ui::WindowManagerClient* window_manager_client_ = nullptr;
157 164
158 std::unique_ptr<views::PointerWatcherEventRouter> 165 std::unique_ptr<views::PointerWatcherEventRouter>
159 pointer_watcher_event_router_; 166 pointer_watcher_event_router_;
160 167
161 std::unique_ptr<ShadowController> shadow_controller_; 168 std::unique_ptr<ShadowController> shadow_controller_;
162 169
(...skipping 10 matching lines...) Expand all
173 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_; 180 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_;
174 uint16_t next_accelerator_namespace_id_ = 0u; 181 uint16_t next_accelerator_namespace_id_ = 0u;
175 182
176 DISALLOW_COPY_AND_ASSIGN(WindowManager); 183 DISALLOW_COPY_AND_ASSIGN(WindowManager);
177 }; 184 };
178 185
179 } // namespace mus 186 } // namespace mus
180 } // namespace ash 187 } // namespace ash
181 188
182 #endif // ASH_MUS_WINDOW_MANAGER_H_ 189 #endif // ASH_MUS_WINDOW_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/mus/root_window_controller.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698