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

Unified Diff: ash/common/wm_shell.cc

Issue 2628933003: Revert of Reland: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/test/wm_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index 690780d9c621b30e78606fab9a79d8c76cd6f11d..40155129d13f97576d0bec8745c7ba4119b13ea4 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -153,6 +153,11 @@
root_window->GetRootWindowController()->CreateShelf();
}
+void WmShell::ShowShelf() {
+ for (WmWindow* root_window : GetAllRootWindows())
+ root_window->GetRootWindowController()->ShowShelf();
+}
+
void WmShell::CreateShelfDelegate() {
// May be called multiple times as shelves are created and destroyed.
if (shelf_delegate_)
@@ -269,7 +274,6 @@
window_cycle_controller_(base::MakeUnique<WindowCycleController>()),
window_selector_controller_(
base::MakeUnique<WindowSelectorController>()) {
- session_controller_->AddSessionStateObserver(this);
prefs::mojom::PreferencesManagerPtr pref_manager_ptr;
// Can be null in tests.
@@ -280,9 +284,7 @@
pref_store_ = new preferences::PrefObserverStore(std::move(pref_manager_ptr));
}
-WmShell::~WmShell() {
- session_controller_->RemoveSessionStateObserver(this);
-}
+WmShell::~WmShell() {}
RootWindowController* WmShell::GetPrimaryRootWindowController() {
return GetPrimaryRootWindow()->GetRootWindowController();
@@ -416,11 +418,4 @@
accelerator_controller_ = std::move(accelerator_controller);
}
-void WmShell::SessionStateChanged(session_manager::SessionState state) {
- // Create the shelf when a session becomes active. It's safe to do this
- // multiple times (e.g. initial login vs. multiprofile add session).
- if (state == session_manager::SessionState::ACTIVE)
- CreateShelf();
-}
-
} // namespace ash
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/test/wm_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698