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

Side by Side Diff: ash/mus/bridge/shell_port_mash.h

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. 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
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 ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ 5 #ifndef ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_
6 #define ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ 6 #define ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 23 matching lines...) Expand all
34 class AcceleratorControllerRegistrar; 34 class AcceleratorControllerRegistrar;
35 class ImmersiveHandlerFactoryMus; 35 class ImmersiveHandlerFactoryMus;
36 class WindowManager; 36 class WindowManager;
37 class ShellPortMashTestApi; 37 class ShellPortMashTestApi;
38 38
39 // ShellPort implementation for mash/mus. See ash/README.md for more. 39 // ShellPort implementation for mash/mus. See ash/README.md for more.
40 class ShellPortMash : public ShellPort, public WindowTreeHostManager::Observer { 40 class ShellPortMash : public ShellPort, public WindowTreeHostManager::Observer {
41 public: 41 public:
42 // If |create_session_state_delegate_stub| is true SessionStateDelegateStub is 42 // If |create_session_state_delegate_stub| is true SessionStateDelegateStub is
43 // created. If false, the SessionStateDelegate from Shell is used. 43 // created. If false, the SessionStateDelegate from Shell is used.
44 ShellPortMash(WmWindow* primary_root_window, 44 ShellPortMash(aura::Window* primary_root_window,
45 WindowManager* window_manager, 45 WindowManager* window_manager,
46 views::PointerWatcherEventRouter* pointer_watcher_event_router, 46 views::PointerWatcherEventRouter* pointer_watcher_event_router,
47 bool create_session_state_delegate_stub); 47 bool create_session_state_delegate_stub);
48 ~ShellPortMash() override; 48 ~ShellPortMash() override;
49 49
50 static ShellPortMash* Get(); 50 static ShellPortMash* Get();
51 51
52 ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id); 52 ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id);
53 53
54 AcceleratorControllerDelegateAura* accelerator_controller_delegate_mus() { 54 AcceleratorControllerDelegateAura* accelerator_controller_delegate_mus() {
55 return mus_state_->accelerator_controller_delegate.get(); 55 return mus_state_->accelerator_controller_delegate.get();
56 } 56 }
57 57
58 aura::WindowTreeClient* window_tree_client(); 58 aura::WindowTreeClient* window_tree_client();
59 59
60 WindowManager* window_manager() { return window_manager_; } 60 WindowManager* window_manager() { return window_manager_; }
61 61
62 // ShellPort: 62 // ShellPort:
63 void Shutdown() override; 63 void Shutdown() override;
64 Config GetAshConfig() const override; 64 Config GetAshConfig() const override;
65 WmWindow* GetPrimaryRootWindow() override; 65 aura::Window* GetPrimaryRootWindow() override;
66 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; 66 aura::Window* GetRootWindowForDisplayId(int64_t display_id) override;
67 const display::ManagedDisplayInfo& GetDisplayInfo( 67 const display::ManagedDisplayInfo& GetDisplayInfo(
68 int64_t display_id) const override; 68 int64_t display_id) const override;
69 bool IsActiveDisplayId(int64_t display_id) const override; 69 bool IsActiveDisplayId(int64_t display_id) const override;
70 display::Display GetFirstDisplay() const override; 70 display::Display GetFirstDisplay() const override;
71 bool IsInUnifiedMode() const override; 71 bool IsInUnifiedMode() const override;
72 bool IsInUnifiedModeIgnoreMirroring() const override; 72 bool IsInUnifiedModeIgnoreMirroring() const override;
73 void SetDisplayWorkAreaInsets(WmWindow* window, 73 void SetDisplayWorkAreaInsets(WmWindow* window,
74 const gfx::Insets& insets) override; 74 const gfx::Insets& insets) override;
75 void LockCursor() override; 75 void LockCursor() override;
76 void UnlockCursor() override; 76 void UnlockCursor() override;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 accelerator_controller_delegate; 142 accelerator_controller_delegate;
143 }; 143 };
144 144
145 // WindowTreeHostManager::Observer: 145 // WindowTreeHostManager::Observer:
146 void OnDisplayConfigurationChanging() override; 146 void OnDisplayConfigurationChanging() override;
147 void OnDisplayConfigurationChanged() override; 147 void OnDisplayConfigurationChanged() override;
148 148
149 WindowManager* window_manager_; 149 WindowManager* window_manager_;
150 150
151 // TODO(sky): remove this once mash supports simple display management. 151 // TODO(sky): remove this once mash supports simple display management.
152 WmWindow* primary_root_window_; 152 aura::Window* primary_root_window_;
153 153
154 // Only one of |mash_state_| or |mus_state_| is created, depending upon 154 // Only one of |mash_state_| or |mus_state_| is created, depending upon
155 // Config. 155 // Config.
156 std::unique_ptr<MashSpecificState> mash_state_; 156 std::unique_ptr<MashSpecificState> mash_state_;
157 std::unique_ptr<MusSpecificState> mus_state_; 157 std::unique_ptr<MusSpecificState> mus_state_;
158 158
159 std::unique_ptr<SessionStateDelegate> session_state_delegate_; 159 std::unique_ptr<SessionStateDelegate> session_state_delegate_;
160 160
161 bool added_display_observer_ = false; 161 bool added_display_observer_ = false;
162 base::ObserverList<WmDisplayObserver> display_observers_; 162 base::ObserverList<WmDisplayObserver> display_observers_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(ShellPortMash); 164 DISALLOW_COPY_AND_ASSIGN(ShellPortMash);
165 }; 165 };
166 166
167 } // namespace mus 167 } // namespace mus
168 } // namespace ash 168 } // namespace ash
169 169
170 #endif // ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_ 170 #endif // ASH_MUS_BRIDGE_SHELL_PORT_MASH_H_
OLDNEW
« no previous file with comments | « ash/mus/accelerators/accelerator_controller_registrar.cc ('k') | ash/mus/bridge/shell_port_mash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698