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

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

Issue 2350953009: Centralizes more shared code between ash and mash (Closed)
Patch Set: feedback 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
« 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>
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_observer.h"
19 #include "services/ui/public/cpp/window_tree_client_delegate.h" 18 #include "services/ui/public/cpp/window_tree_client_delegate.h"
20 #include "services/ui/public/interfaces/window_manager.mojom.h" 19 #include "services/ui/public/interfaces/window_manager.mojom.h"
21 20
22 namespace base { 21 namespace base {
23 class SequencedWorkerPool; 22 class SequencedWorkerPool;
24 } 23 }
25 24
26 namespace display { 25 namespace display {
27 class Display; 26 class Display;
28 class ScreenBase; 27 class ScreenBase;
(...skipping 16 matching lines...) Expand all
45 class WindowManagerObserver; 44 class WindowManagerObserver;
46 class WmShellMus; 45 class WmShellMus;
47 class WmLookupMus; 46 class WmLookupMus;
48 class WmTestHelper; 47 class WmTestHelper;
49 48
50 // WindowManager serves as the WindowManagerDelegate and 49 // WindowManager serves as the WindowManagerDelegate and
51 // WindowTreeClientDelegate for mash. WindowManager creates (and owns) 50 // WindowTreeClientDelegate for mash. WindowManager creates (and owns)
52 // a RootWindowController per Display. WindowManager takes ownership of 51 // a RootWindowController per Display. WindowManager takes ownership of
53 // the WindowTreeClient. 52 // the WindowTreeClient.
54 class WindowManager : public ui::WindowManagerDelegate, 53 class WindowManager : public ui::WindowManagerDelegate,
55 public ui::WindowObserver,
56 public ui::WindowTreeClientDelegate { 54 public ui::WindowTreeClientDelegate {
57 public: 55 public:
58 explicit WindowManager(shell::Connector* connector); 56 explicit WindowManager(shell::Connector* connector);
59 ~WindowManager() override; 57 ~WindowManager() override;
60 58
61 void Init(std::unique_ptr<ui::WindowTreeClient> window_tree_client, 59 void Init(std::unique_ptr<ui::WindowTreeClient> window_tree_client,
62 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool); 60 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool);
63 61
64 WmShellMus* shell() { return shell_.get(); } 62 WmShellMus* shell() { return shell_.get(); }
65 63
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 RootWindowController* root_window_controller); 104 RootWindowController* root_window_controller);
107 105
108 void Shutdown(); 106 void Shutdown();
109 107
110 // Returns an iterator into |root_window_controllers_|. Returns 108 // Returns an iterator into |root_window_controllers_|. Returns
111 // root_window_controllers_.end() if |window| is not the root of a 109 // root_window_controllers_.end() if |window| is not the root of a
112 // RootWindowController. 110 // RootWindowController.
113 RootWindowControllers::iterator FindRootWindowControllerByWindow( 111 RootWindowControllers::iterator FindRootWindowControllerByWindow(
114 ui::Window* window); 112 ui::Window* window);
115 113
116 // ui::WindowObserver: 114 RootWindowController* GetPrimaryRootWindowController();
117 void OnWindowDestroying(ui::Window* window) override;
118 void OnWindowDestroyed(ui::Window* window) override;
119 115
120 // WindowTreeClientDelegate: 116 // WindowTreeClientDelegate:
121 void OnEmbed(ui::Window* root) override; 117 void OnEmbed(ui::Window* root) override;
122 void OnEmbedRootDestroyed(ui::Window* root) override; 118 void OnEmbedRootDestroyed(ui::Window* root) override;
123 void OnLostConnection(ui::WindowTreeClient* client) override; 119 void OnLostConnection(ui::WindowTreeClient* client) override;
124 void OnPointerEventObserved(const ui::PointerEvent& event, 120 void OnPointerEventObserved(const ui::PointerEvent& event,
125 ui::Window* target) override; 121 ui::Window* target) override;
126 122
127 // WindowManagerDelegate: 123 // WindowManagerDelegate:
128 void SetWindowManagerClient(ui::WindowManagerClient* client) override; 124 void SetWindowManagerClient(ui::WindowManagerClient* client) override;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_; 166 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_;
171 uint16_t next_accelerator_namespace_id_ = 0u; 167 uint16_t next_accelerator_namespace_id_ = 0u;
172 168
173 DISALLOW_COPY_AND_ASSIGN(WindowManager); 169 DISALLOW_COPY_AND_ASSIGN(WindowManager);
174 }; 170 };
175 171
176 } // namespace mus 172 } // namespace mus
177 } // namespace ash 173 } // namespace ash
178 174
179 #endif // ASH_MUS_WINDOW_MANAGER_H_ 175 #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