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

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

Issue 2694623016: chromeos: Makes AshTestBase/Helper target mash when appropriate (Closed)
Patch Set: feedback Created 3 years, 10 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>
(...skipping 27 matching lines...) Expand all
38 namespace wm { 38 namespace wm {
39 class WMState; 39 class WMState;
40 } 40 }
41 41
42 namespace ash { 42 namespace ash {
43 43
44 class RootWindowController; 44 class RootWindowController;
45 class ScreenMus; 45 class ScreenMus;
46 class ShellDelegate; 46 class ShellDelegate;
47 47
48 namespace test {
49 class AshTestHelper;
50 }
51
48 namespace mus { 52 namespace mus {
49 53
50 class AcceleratorHandler; 54 class AcceleratorHandler;
51 class WmLookupMus; 55 class WmLookupMus;
52 class WmTestHelper; 56 class WmTestHelper;
53 57
54 // WindowManager serves as the WindowManagerDelegate and 58 // WindowManager serves as the WindowManagerDelegate and
55 // WindowTreeClientDelegate for mash. WindowManager creates (and owns) 59 // WindowTreeClientDelegate for mash. WindowManager creates (and owns)
56 // a RootWindowController per Display. WindowManager takes ownership of 60 // a RootWindowController per Display. WindowManager takes ownership of
57 // the WindowTreeClient. 61 // the WindowTreeClient.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Returns the DisplayController interface if available. Will be null if no 99 // Returns the DisplayController interface if available. Will be null if no
96 // service_manager::Connector was available, for example in some tests. 100 // service_manager::Connector was available, for example in some tests.
97 display::mojom::DisplayController* GetDisplayController(); 101 display::mojom::DisplayController* GetDisplayController();
98 102
99 // Called during creation of the shell to create a RootWindowController. 103 // Called during creation of the shell to create a RootWindowController.
100 // See comment in CreateRootWindowController() for details. 104 // See comment in CreateRootWindowController() for details.
101 void CreatePrimaryRootWindowController( 105 void CreatePrimaryRootWindowController(
102 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host); 106 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host);
103 107
104 private: 108 private:
109 friend class ash::test::AshTestHelper;
105 friend class WmTestHelper; 110 friend class WmTestHelper;
106 111
107 using RootWindowControllers = std::set<std::unique_ptr<RootWindowController>>; 112 using RootWindowControllers = std::set<std::unique_ptr<RootWindowController>>;
108 113
109 // Called once the first Display has been obtained. 114 // Called once the first Display has been obtained.
110 void CreateShell( 115 void CreateShell(
111 std::unique_ptr<aura::WindowTreeHostMus> primary_window_tree_host); 116 std::unique_ptr<aura::WindowTreeHostMus> primary_window_tree_host);
112 117
113 void CreateAndRegisterRootWindowController( 118 void CreateAndRegisterRootWindowController(
114 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host, 119 std::unique_ptr<aura::WindowTreeHostMus> window_tree_host,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 std::unique_ptr<WmLookupMus> lookup_; 192 std::unique_ptr<WmLookupMus> lookup_;
188 193
189 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_; 194 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_;
190 uint16_t next_accelerator_namespace_id_ = 0u; 195 uint16_t next_accelerator_namespace_id_ = 0u;
191 196
192 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; 197 scoped_refptr<base::SequencedWorkerPool> blocking_pool_;
193 198
194 // Only set in tests. If non-null this is used as the shell delegate. 199 // Only set in tests. If non-null this is used as the shell delegate.
195 std::unique_ptr<ShellDelegate> shell_delegate_for_test_; 200 std::unique_ptr<ShellDelegate> shell_delegate_for_test_;
196 201
202 // See WmShellMus's constructor for details. Tests may set to false.
203 bool create_session_state_delegate_stub_for_test_ = true;
204
197 DISALLOW_COPY_AND_ASSIGN(WindowManager); 205 DISALLOW_COPY_AND_ASSIGN(WindowManager);
198 }; 206 };
199 207
200 } // namespace mus 208 } // namespace mus
201 } // namespace ash 209 } // namespace ash
202 210
203 #endif // ASH_MUS_WINDOW_MANAGER_H_ 211 #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