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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc

Issue 2177663002: mash: Move ownership of ShelfDelegate to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix wallpaper tests again 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 | « chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
index a2e406b417a1f45966b21719cca2b2c81b6d62c6..9cd8b76ae1d476e7d3a61af442877e57cd88cc6a 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
@@ -21,8 +21,8 @@
#include "ui/views/widget/widget.h"
#if defined(USE_ASH)
-#include "ash/shelf/shelf_delegate.h"
-#include "ash/shell.h"
+#include "ash/common/shelf/shelf_delegate.h"
+#include "ash/common/wm_shell.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h"
#endif
@@ -90,7 +90,7 @@ void AppInfoFooterPanel::UpdatePinButtons(bool focus_visible_button) {
#if defined(USE_ASH)
if (pin_to_shelf_button_ && unpin_from_shelf_button_) {
bool is_pinned =
- !ash::Shell::GetInstance()->GetShelfDelegate()->IsAppPinned(app_->id());
+ !ash::WmShell::Get()->shelf_delegate()->IsAppPinned(app_->id());
pin_to_shelf_button_->SetVisible(is_pinned);
unpin_from_shelf_button_->SetVisible(!is_pinned);
@@ -152,8 +152,7 @@ bool AppInfoFooterPanel::CanCreateShortcuts() const {
#if defined(USE_ASH)
void AppInfoFooterPanel::SetPinnedToShelf(bool value) {
DCHECK(CanSetPinnedToShelf());
- ash::ShelfDelegate* shelf_delegate =
- ash::Shell::GetInstance()->GetShelfDelegate();
+ ash::ShelfDelegate* shelf_delegate = ash::WmShell::Get()->shelf_delegate();
DCHECK(shelf_delegate);
if (value)
shelf_delegate->PinAppWithID(app_->id());
@@ -166,7 +165,7 @@ void AppInfoFooterPanel::SetPinnedToShelf(bool value) {
bool AppInfoFooterPanel::CanSetPinnedToShelf() const {
// Non-Ash platforms don't have a shelf.
- if (!ash::Shell::HasInstance())
+ if (!ash::WmShell::HasInstance())
return false;
// The Chrome app can't be unpinned, and extensions can't be pinned.
« no previous file with comments | « chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698