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

Side by Side Diff: ash/root_window_controller.h

Issue 2889673002: chromeos: Refactor shelf to create ShelfView earlier in startup (Closed)
Patch Set: Move ShelfView to initializer list 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_ROOT_WINDOW_CONTROLLER_H_ 5 #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_
6 #define ASH_ROOT_WINDOW_CONTROLLER_H_ 6 #define ASH_ROOT_WINDOW_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 const WmWindow* GetWindow() const; 132 const WmWindow* GetWindow() const;
133 133
134 WorkspaceController* workspace_controller() { 134 WorkspaceController* workspace_controller() {
135 return workspace_controller_.get(); 135 return workspace_controller_.get();
136 } 136 }
137 137
138 wm::WorkspaceWindowState GetWorkspaceWindowState(); 138 wm::WorkspaceWindowState GetWorkspaceWindowState();
139 139
140 WmShelf* wm_shelf() const { return wm_shelf_.get(); } 140 WmShelf* wm_shelf() const { return wm_shelf_.get(); }
141 141
142 // TODO(jamescook): Eliminate this. It always returns true after the
msw 2017/05/16 22:42:00 nit: There's only two occurrences, maybe just do t
James Cook 2017/05/17 16:16:12 Done. As I suspected, it wasn't needed at all.
143 // layout managers are initialized.
142 bool HasShelf(); 144 bool HasShelf();
143 145
144 WmShelf* GetShelf(); 146 WmShelf* GetShelf();
145 147
146 // Creates the shelf view for this root window and notifies observers. 148 // Initializes the shelf for this root window and notifies observers.
147 void CreateShelfView(); 149 void InitializeShelf();
148 150
149 // Get touch HUDs associated with this root window controller. 151 // Get touch HUDs associated with this root window controller.
150 TouchHudDebug* touch_hud_debug() const { return touch_hud_debug_; } 152 TouchHudDebug* touch_hud_debug() const { return touch_hud_debug_; }
151 TouchHudProjection* touch_hud_projection() const { 153 TouchHudProjection* touch_hud_projection() const {
152 return touch_hud_projection_; 154 return touch_hud_projection_;
153 } 155 }
154 156
155 // Set touch HUDs for this root window controller. The root window controller 157 // Set touch HUDs for this root window controller. The root window controller
156 // will not own the HUDs; their lifetimes are managed by themselves. Whenever 158 // will not own the HUDs; their lifetimes are managed by themselves. Whenever
157 // the widget showing a HUD is being destroyed (e.g. because of detaching a 159 // the widget showing a HUD is being destroyed (e.g. because of detaching a
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 std::unique_ptr<views::MenuModelAdapter> menu_model_adapter_; 347 std::unique_ptr<views::MenuModelAdapter> menu_model_adapter_;
346 std::unique_ptr<views::MenuRunner> menu_runner_; 348 std::unique_ptr<views::MenuRunner> menu_runner_;
347 349
348 std::unique_ptr<StackingController> stacking_controller_; 350 std::unique_ptr<StackingController> stacking_controller_;
349 351
350 // The shelf controller for this root window. Exists for the entire lifetime 352 // The shelf controller for this root window. Exists for the entire lifetime
351 // of the RootWindowController so that it is safe for observers to be added 353 // of the RootWindowController so that it is safe for observers to be added
352 // to it during construction of the shelf widget and status tray. 354 // to it during construction of the shelf widget and status tray.
353 std::unique_ptr<WmShelf> wm_shelf_; 355 std::unique_ptr<WmShelf> wm_shelf_;
354 356
357 // TODO(jamescook): Eliminate this. It is left over from legacy shelf code and
358 // doesn't mean anything in particular.
359 bool shelf_initialized_ = false;
360
355 std::unique_ptr<SystemWallpaperController> system_wallpaper_; 361 std::unique_ptr<SystemWallpaperController> system_wallpaper_;
356 362
357 std::unique_ptr<BootSplashScreen> boot_splash_screen_; 363 std::unique_ptr<BootSplashScreen> boot_splash_screen_;
358 // Responsible for initializing TouchExplorationController when spoken 364 // Responsible for initializing TouchExplorationController when spoken
359 // feedback is on. 365 // feedback is on.
360 std::unique_ptr<AshTouchExplorationManager> touch_exploration_manager_; 366 std::unique_ptr<AshTouchExplorationManager> touch_exploration_manager_;
361 367
362 // Heads-up displays for touch events. These HUDs are not owned by the root 368 // Heads-up displays for touch events. These HUDs are not owned by the root
363 // window controller and manage their own lifetimes. 369 // window controller and manage their own lifetimes.
364 TouchHudDebug* touch_hud_debug_ = nullptr; 370 TouchHudDebug* touch_hud_debug_ = nullptr;
(...skipping 11 matching lines...) Expand all
376 382
377 // On classic ash, returns the RootWindowController for the given |root_window|. 383 // On classic ash, returns the RootWindowController for the given |root_window|.
378 // On mus ash, returns the RootWindowController for the primary display. 384 // On mus ash, returns the RootWindowController for the primary display.
379 // See RootWindowController class comment above. 385 // See RootWindowController class comment above.
380 ASH_EXPORT RootWindowController* GetRootWindowController( 386 ASH_EXPORT RootWindowController* GetRootWindowController(
381 const aura::Window* root_window); 387 const aura::Window* root_window);
382 388
383 } // namespace ash 389 } // namespace ash
384 390
385 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ 391 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698