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

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

Issue 2777223002: Gets chrome --mus some what working (Closed)
Patch Set: fix mac 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 unified diff | Download patch
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/bridge/wm_shell_mus.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 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_WM_SHELL_MUS_H_ 5 #ifndef ASH_MUS_BRIDGE_WM_SHELL_MUS_H_
6 #define ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ 6 #define ASH_MUS_BRIDGE_WM_SHELL_MUS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/common/wm_shell.h" 13 #include "ash/common/wm_shell.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 15
16 namespace aura { 16 namespace aura {
17 class WindowTreeClient; 17 class WindowTreeClient;
18 } 18 }
19 19
20 namespace views { 20 namespace views {
21 class PointerWatcherEventRouter; 21 class PointerWatcherEventRouter;
22 } 22 }
23 23
24 namespace ash { 24 namespace ash {
25 25
26 class AcceleratorControllerDelegateAura;
26 class RootWindowController; 27 class RootWindowController;
27 28
28 namespace mus { 29 namespace mus {
29 30
30 class AcceleratorControllerDelegateMus; 31 class AcceleratorControllerDelegateMus;
31 class AcceleratorControllerRegistrar; 32 class AcceleratorControllerRegistrar;
32 class ImmersiveHandlerFactoryMus; 33 class ImmersiveHandlerFactoryMus;
33 class WindowManager; 34 class WindowManager;
34 class WmShellMusTestApi; 35 class WmShellMusTestApi;
35 36
36 // WmShell implementation for mus. 37 // WmShell implementation for mus.
37 class WmShellMus : public WmShell { 38 class WmShellMus : public WmShell {
38 public: 39 public:
39 // If |create_session_state_delegate_stub| is true SessionStateDelegateStub is 40 // If |create_session_state_delegate_stub| is true SessionStateDelegateStub is
40 // created. If false, the SessionStateDelegate from Shell is used. 41 // created. If false, the SessionStateDelegate from Shell is used.
41 WmShellMus(WmWindow* primary_root_window, 42 WmShellMus(WmWindow* primary_root_window,
42 WindowManager* window_manager, 43 WindowManager* window_manager,
43 views::PointerWatcherEventRouter* pointer_watcher_event_router, 44 views::PointerWatcherEventRouter* pointer_watcher_event_router,
44 bool create_session_state_delegate_stub); 45 bool create_session_state_delegate_stub);
45 ~WmShellMus() override; 46 ~WmShellMus() override;
46 47
47 static WmShellMus* Get(); 48 static WmShellMus* Get();
48 49
49 ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id); 50 ash::RootWindowController* GetRootWindowControllerWithDisplayId(int64_t id);
50 51
51 AcceleratorControllerDelegateMus* accelerator_controller_delegate() { 52 AcceleratorControllerDelegateAura* accelerator_controller_delegate_classic() {
52 return accelerator_controller_delegate_.get(); 53 return accelerator_controller_delegate_classic_.get();
53 } 54 }
54 55
55 aura::WindowTreeClient* window_tree_client(); 56 aura::WindowTreeClient* window_tree_client();
56 57
57 WindowManager* window_manager() { return window_manager_; } 58 WindowManager* window_manager() { return window_manager_; }
58 59
59 // WmShell: 60 // WmShell:
60 void Shutdown() override; 61 void Shutdown() override;
61 bool IsRunningInMash() const override; 62 bool IsRunningInMash() const override;
63 Config GetConfig() const override;
62 WmWindow* GetFocusedWindow() override; 64 WmWindow* GetFocusedWindow() override;
63 WmWindow* GetActiveWindow() override; 65 WmWindow* GetActiveWindow() override;
64 WmWindow* GetCaptureWindow() override; 66 WmWindow* GetCaptureWindow() override;
65 WmWindow* GetPrimaryRootWindow() override; 67 WmWindow* GetPrimaryRootWindow() override;
66 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override; 68 WmWindow* GetRootWindowForDisplayId(int64_t display_id) override;
67 const display::ManagedDisplayInfo& GetDisplayInfo( 69 const display::ManagedDisplayInfo& GetDisplayInfo(
68 int64_t display_id) const override; 70 int64_t display_id) const override;
69 bool IsActiveDisplayId(int64_t display_id) const override; 71 bool IsActiveDisplayId(int64_t display_id) const override;
70 display::Display GetFirstDisplay() const override; 72 display::Display GetFirstDisplay() const override;
71 bool IsInUnifiedMode() const override; 73 bool IsInUnifiedMode() const override;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 std::unique_ptr<AcceleratorController> CreateAcceleratorController() override; 114 std::unique_ptr<AcceleratorController> CreateAcceleratorController() override;
113 115
114 private: 116 private:
115 friend class WmShellMusTestApi; 117 friend class WmShellMusTestApi;
116 118
117 WindowManager* window_manager_; 119 WindowManager* window_manager_;
118 120
119 WmWindow* primary_root_window_; 121 WmWindow* primary_root_window_;
120 views::PointerWatcherEventRouter* pointer_watcher_event_router_; 122 views::PointerWatcherEventRouter* pointer_watcher_event_router_;
121 123
124 // |accelerator_controller_delegate_classic_| is created in MUS mode,
125 // |accelerator_controller_delegate_| in MASH mode.
122 std::unique_ptr<AcceleratorControllerDelegateMus> 126 std::unique_ptr<AcceleratorControllerDelegateMus>
123 accelerator_controller_delegate_; 127 accelerator_controller_delegate_;
128 std::unique_ptr<AcceleratorControllerDelegateAura>
129 accelerator_controller_delegate_classic_;
124 std::unique_ptr<AcceleratorControllerRegistrar> 130 std::unique_ptr<AcceleratorControllerRegistrar>
125 accelerator_controller_registrar_; 131 accelerator_controller_registrar_;
126 std::unique_ptr<ImmersiveHandlerFactoryMus> immersive_handler_factory_; 132 std::unique_ptr<ImmersiveHandlerFactoryMus> immersive_handler_factory_;
127 std::unique_ptr<SessionStateDelegate> session_state_delegate_; 133 std::unique_ptr<SessionStateDelegate> session_state_delegate_;
128 134
129 DISALLOW_COPY_AND_ASSIGN(WmShellMus); 135 DISALLOW_COPY_AND_ASSIGN(WmShellMus);
130 }; 136 };
131 137
132 } // namespace mus 138 } // namespace mus
133 } // namespace ash 139 } // namespace ash
134 140
135 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_ 141 #endif // ASH_MUS_BRIDGE_WM_SHELL_MUS_H_
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698