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

Unified Diff: ash/wm/shelf_layout_manager.cc

Issue 9965070: Restore tray background when locking screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« ash/wm/shelf_layout_manager.h ('K') | « ash/wm/shelf_layout_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shelf_layout_manager.cc
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index 0251f844eb65c52190ea299a41ba43e6aa8fbe9e..9d1099e309cfc623d165b2e0af808452dd16c3e9 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -271,9 +271,11 @@ void ShelfLayoutManager::OnWindowPropertyChanged(aura::Window* window,
// ShelfLayoutManager, private:
void ShelfLayoutManager::SetState(VisibilityState visibility_state) {
+ ShellDelegate* delegate = Shell::GetInstance()->delegate();
State state;
state.visibility_state = visibility_state;
state.auto_hide_state = CalculateAutoHideState(visibility_state);
+ state.locked_state = delegate && delegate->IsScreenLocked();
if (state_.Equals(state))
return; // Nothing changed.
@@ -383,7 +385,8 @@ void ShelfLayoutManager::UpdateShelfBackground(
}
bool ShelfLayoutManager::GetLauncherPaintsBackground() const {
- return window_overlaps_shelf_ || state_.visibility_state == AUTO_HIDE;
+ return (!state_.locked_state && window_overlaps_shelf_) ||
+ state_.visibility_state == AUTO_HIDE;
}
void ShelfLayoutManager::UpdateAutoHideStateNow() {
« ash/wm/shelf_layout_manager.h ('K') | « ash/wm/shelf_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698