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

Unified Diff: ash/mus/bridge/wm_shell_mus.h

Issue 2783563002: Make WmShellMus use classic types for mus (Closed)
Patch Set: comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/bridge/wm_shell_mus.h
diff --git a/ash/mus/bridge/wm_shell_mus.h b/ash/mus/bridge/wm_shell_mus.h
index eb756e7adbb990653786b67bef157f2098137033..3025716593fcb056f1653307f74b7979a66d43c1 100644
--- a/ash/mus/bridge/wm_shell_mus.h
+++ b/ash/mus/bridge/wm_shell_mus.h
@@ -24,6 +24,7 @@ class PointerWatcherEventRouter;
namespace ash {
class AcceleratorControllerDelegateAura;
+class PointerWatcherAdapter;
class RootWindowController;
namespace mus {
@@ -49,8 +50,8 @@ class WmShellMus : public WmShell {
ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id);
- AcceleratorControllerDelegateAura* accelerator_controller_delegate_classic() {
- return accelerator_controller_delegate_classic_.get();
+ AcceleratorControllerDelegateAura* accelerator_controller_delegate_mus() {
+ return mus_state_->accelerator_controller_delegate.get();
}
aura::WindowTreeClient* window_tree_client();
@@ -116,20 +117,36 @@ class WmShellMus : public WmShell {
private:
friend class WmShellMusTestApi;
+ struct MashSpecificState {
+ MashSpecificState();
+ ~MashSpecificState();
+
+ views::PointerWatcherEventRouter* pointer_watcher_event_router = nullptr;
+ std::unique_ptr<AcceleratorControllerDelegateMus>
+ accelerator_controller_delegate;
+ std::unique_ptr<AcceleratorControllerRegistrar>
+ accelerator_controller_registrar;
+ std::unique_ptr<ImmersiveHandlerFactoryMus> immersive_handler_factory;
+ };
+
+ struct MusSpecificState {
+ MusSpecificState();
+ ~MusSpecificState();
+
+ std::unique_ptr<PointerWatcherAdapter> pointer_watcher_adapter;
+ std::unique_ptr<AcceleratorControllerDelegateAura>
+ accelerator_controller_delegate;
+ };
+
WindowManager* window_manager_;
WmWindow* primary_root_window_;
- views::PointerWatcherEventRouter* pointer_watcher_event_router_;
-
- // |accelerator_controller_delegate_classic_| is created in MUS mode,
- // |accelerator_controller_delegate_| in MASH mode.
- std::unique_ptr<AcceleratorControllerDelegateMus>
- accelerator_controller_delegate_;
- std::unique_ptr<AcceleratorControllerDelegateAura>
- accelerator_controller_delegate_classic_;
- std::unique_ptr<AcceleratorControllerRegistrar>
- accelerator_controller_registrar_;
- std::unique_ptr<ImmersiveHandlerFactoryMus> immersive_handler_factory_;
+
+ // Only one of |mash_state_| or |mus_state_| is created, depending upon
+ // Config.
+ std::unique_ptr<MashSpecificState> mash_state_;
+ std::unique_ptr<MusSpecificState> mus_state_;
+
std::unique_ptr<SessionStateDelegate> session_state_delegate_;
DISALLOW_COPY_AND_ASSIGN(WmShellMus);
« no previous file with comments | « no previous file | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698