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

Unified Diff: ash/shelf/shelf_view.cc

Issue 2186913003: Eliminate ash::Shell access in ShelfView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/mus/bridge/wm_shell_mus.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 0324d5e444029d9215f868eeb8e022912557e3cf..7e3119ed71ba7ce9c57122915049e4fc51b405e1 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -19,6 +19,7 @@
#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/shelf/shelf_menu_model.h"
#include "ash/common/shelf/shelf_model.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shell_delegate.h"
#include "ash/common/wm/root_window_finder.h"
#include "ash/common/wm_shell.h"
@@ -27,7 +28,6 @@
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_icon_observer.h"
#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
#include "base/auto_reset.h"
#include "base/metrics/histogram.h"
#include "grit/ash_strings.h"
@@ -1380,7 +1380,7 @@ void ShelfView::ToggleOverflowBubble() {
overflow_bubble_->Show(overflow_button_, overflow_view);
- Shell::GetInstance()->UpdateShelfVisibility();
+ wm_shelf_->UpdateVisibilityState();
msw 2016/07/27 22:45:11 q: ok to only update this shelf, not all (like She
James Cook 2016/07/27 22:54:01 Yes. The overflow bubble is only associated with t
}
void ShelfView::OnFadeOutAnimationEnded() {
@@ -1781,7 +1781,7 @@ void ShelfView::ShowContextMenuForView(views::View* source,
const ShelfItem* item = ShelfItemForView(source);
if (!item) {
- Shell::GetInstance()->ShowContextMenu(point, source_type);
+ WmShell::Get()->ShowContextMenu(point, source_type);
return;
}
@@ -1861,7 +1861,8 @@ void ShelfView::OnMenuClosed(views::InkDrop* ink_drop) {
menu_model_.reset();
scoped_target_root_window_.reset();
- Shell::GetInstance()->UpdateShelfVisibility();
+ // Auto-hide or alignment might have changed, but only for this shelf.
+ wm_shelf_->UpdateVisibilityState();
}
void ShelfView::OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) {
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698