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

Side by Side Diff: ash/common/shelf/shelf_widget.cc

Issue 2773473003: cros: Add CHECK to ShelfWidget initialization enabling future cleanup. (Closed)
Patch Set: Initial upload 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "ash/common/shelf/shelf_widget.h" 5 #include "ash/common/shelf/shelf_widget.h"
6 6
7 #include "ash/animation/animation_change_type.h" 7 #include "ash/animation/animation_change_type.h"
8 #include "ash/common/focus_cycler.h" 8 #include "ash/common/focus_cycler.h"
9 #include "ash/common/session/session_controller.h" 9 #include "ash/common/session/session_controller.h"
10 #include "ash/common/shelf/app_list_button.h" 10 #include "ash/common/shelf/app_list_button.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 // Ensure the newly created |shelf_| gets current values. 244 // Ensure the newly created |shelf_| gets current values.
245 background_animator_.NotifyObserver(this); 245 background_animator_.NotifyObserver(this);
246 246
247 // TODO(jamescook): The IsActiveUserSessionStarted() check may not be needed 247 // TODO(jamescook): The IsActiveUserSessionStarted() check may not be needed
248 // because the shelf is only created after the first user session is active. 248 // because the shelf is only created after the first user session is active.
249 // The ShelfView seems to always be visible after login. At the lock screen 249 // The ShelfView seems to always be visible after login. At the lock screen
250 // the shelf is hidden because its container is hidden. During auto-hide it is 250 // the shelf is hidden because its container is hidden. During auto-hide it is
251 // hidden because ShelfWidget is transparent. Some of the ShelfView visibility 251 // hidden because ShelfWidget is transparent. Some of the ShelfView visibility
252 // code could be simplified. http://crbug.com/674773 252 // code could be simplified. http://crbug.com/674773
253 // TODO(jdufualt|jamescook): Remove CHECK and shelf_view_->SetVisible call in
254 // m60 or beyond (see above TODO).
255 CHECK(Shell::Get()->session_controller()->IsActiveUserSessionStarted());
253 shelf_view_->SetVisible( 256 shelf_view_->SetVisible(
254 Shell::Get()->session_controller()->IsActiveUserSessionStarted()); 257 Shell::Get()->session_controller()->IsActiveUserSessionStarted());
255 shelf_layout_manager_->LayoutShelf(); 258 shelf_layout_manager_->LayoutShelf();
256 shelf_layout_manager_->UpdateAutoHideState(); 259 shelf_layout_manager_->UpdateAutoHideState();
257 Show(); 260 Show();
258 } 261 }
259 262
260 bool ShelfWidget::IsShelfVisible() const { 263 bool ShelfWidget::IsShelfVisible() const {
261 return shelf_view_ && shelf_view_->visible(); 264 return shelf_view_ && shelf_view_->visible();
262 } 265 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 if (shelf_view_) 352 if (shelf_view_)
350 shelf_view_->UpdateShelfItemBackground(color); 353 shelf_view_->UpdateShelfItemBackground(color);
351 } 354 }
352 355
353 void ShelfWidget::WillDeleteShelfLayoutManager() { 356 void ShelfWidget::WillDeleteShelfLayoutManager() {
354 shelf_layout_manager_->RemoveObserver(this); 357 shelf_layout_manager_->RemoveObserver(this);
355 shelf_layout_manager_ = nullptr; 358 shelf_layout_manager_ = nullptr;
356 } 359 }
357 360
358 } // namespace ash 361 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698