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

Unified Diff: ash/shelf/shelf_widget.cc

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget.cc
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 755062249c43c6f3b917a8c732246f116379b0a3..1e2da78ffd72fbf3487437ccf3b66fea8dc5c091 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -10,10 +10,10 @@
#include "ash/launcher/launcher_navigator.h"
#include "ash/launcher/launcher_view.h"
#include "ash/root_window_controller.h"
+#include "ash/session_state_delegate.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
-#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/property_util.h"
#include "ash/wm/status_area_layout_manager.h"
@@ -440,8 +440,10 @@ ShelfWidget::ShelfWidget(
status_area_widget_ = new internal::StatusAreaWidget(status_container);
status_area_widget_->CreateTrayViews();
- if (Shell::GetInstance()->delegate()->IsSessionStarted())
+ if (Shell::GetInstance()->session_state_delegate()->
+ IsActiveUserSessionStarted()) {
status_area_widget_->Show();
+ }
Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_);
shelf_layout_manager_ = new internal::ShelfLayoutManager(this);
@@ -498,9 +500,8 @@ void ShelfWidget::CreateLauncher() {
internal::RootWindowController::ForWindow(window_container_)->
OnLauncherCreated();
- ShellDelegate* delegate = shell->delegate();
- if (delegate)
- launcher_->SetVisible(delegate->IsSessionStarted());
+ launcher_->SetVisible(
+ shell->session_state_delegate()->IsActiveUserSessionStarted());
Show();
}
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698