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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 2898743002: Draggable peeking/fullscreen launcher with transparent background. (Closed)
Patch Set: Rebased to fix merge conflicts and addressed comments. Created 3 years, 7 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
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 429fd15c7004dc7cdd2bbb55fcea370701db4416..9a423c0dac5e8ac1be420fffa4db015355a8543f 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -173,6 +173,11 @@ ShelfLayoutManager::~ShelfLayoutManager() {
ShellPort::Get()->RemoveLockStateObserver(this);
}
+void ShelfLayoutManager::OnAppListIsActive(bool is_active) {
+ app_list_is_active_ = is_active;
sky 2017/05/31 15:04:17 Is it really necessary to cache this state? Could
newcomer 2017/06/01 01:42:54 Done.
+ MaybeUpdateShelfBackground(AnimationChangeType::IMMEDIATE);
+}
+
void ShelfLayoutManager::PrepareForShutdown() {
in_shutdown_ = true;
// Stop observing changes to avoid updating a partially destructed shelf.
@@ -468,6 +473,10 @@ ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const {
if (state_.session_state != session_manager::SessionState::ACTIVE)
return SHELF_BACKGROUND_OVERLAP;
+ // If the app list is active, hide the shelf background to prevent overlap.
+ if (app_list_is_active_)
+ return SHELF_BACKGROUND_DEFAULT;
+
if (state_.visibility_state != SHELF_AUTO_HIDE &&
state_.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED) {
return SHELF_BACKGROUND_MAXIMIZED;

Powered by Google App Engine
This is Rietveld 408576698