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

Side by Side Diff: ash/common/wm_root_window_controller.cc

Issue 2619943002: Revert "chromeos: Fix shelf appearing at login screen under mash" (Closed)
Patch Set: Created 3 years, 11 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_root_window_controller.h ('k') | ash/common/wm_shell.h » ('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 #include "ash/common/wm_root_window_controller.h" 5 #include "ash/common/wm_root_window_controller.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/shelf/shelf_layout_manager.h" 8 #include "ash/common/shelf/shelf_layout_manager.h"
9 #include "ash/common/shelf/shelf_widget.h" 9 #include "ash/common/shelf/shelf_widget.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 209
210 // Notify shell observers that the shelf has been created. 210 // Notify shell observers that the shelf has been created.
211 // TODO(jamescook): Move this into WmShelf::InitializeShelf(). This will 211 // TODO(jamescook): Move this into WmShelf::InitializeShelf(). This will
212 // require changing AttachedPanelWidgetTargeter's access to WmShelf. 212 // require changing AttachedPanelWidgetTargeter's access to WmShelf.
213 WmShell::Get()->NotifyShelfCreatedForRootWindow(GetWindow()); 213 WmShell::Get()->NotifyShelfCreatedForRootWindow(GetWindow());
214 214
215 shelf->shelf_widget()->PostCreateShelf(); 215 shelf->shelf_widget()->PostCreateShelf();
216 } 216 }
217 217
218 void WmRootWindowController::ShowShelf() {
219 WmShelf* shelf = GetShelf();
220 if (!shelf->IsShelfInitialized())
221 return;
222 // TODO(jamescook): Move this into WmShelf.
223 shelf->shelf_widget()->SetShelfVisibility(true);
224 shelf->shelf_widget()->status_area_widget()->Show();
225 }
226
218 SystemTray* WmRootWindowController::GetSystemTray() { 227 SystemTray* WmRootWindowController::GetSystemTray() {
219 ShelfWidget* shelf_widget = GetShelf()->shelf_widget(); 228 ShelfWidget* shelf_widget = GetShelf()->shelf_widget();
220 if (!shelf_widget || !shelf_widget->status_area_widget()) 229 if (!shelf_widget || !shelf_widget->status_area_widget())
221 return nullptr; 230 return nullptr;
222 return shelf_widget->status_area_widget()->system_tray(); 231 return shelf_widget->status_area_widget()->system_tray();
223 } 232 }
224 233
225 WmWindow* WmRootWindowController::GetContainer(int container_id) { 234 WmWindow* WmRootWindowController::GetContainer(int container_id) {
226 return root_->GetChildByShellWindowId(container_id); 235 return root_->GetChildByShellWindowId(container_id);
227 } 236 }
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 } 592 }
584 593
585 void WmRootWindowController::OnMenuClosed() { 594 void WmRootWindowController::OnMenuClosed() {
586 menu_runner_.reset(); 595 menu_runner_.reset();
587 menu_model_adapter_.reset(); 596 menu_model_adapter_.reset();
588 menu_model_.reset(); 597 menu_model_.reset();
589 GetShelf()->UpdateVisibilityState(); 598 GetShelf()->UpdateVisibilityState();
590 } 599 }
591 600
592 } // namespace ash 601 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_root_window_controller.h ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698