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

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

Issue 2791463002: mash: Remove ShelfDelegate; move functions to ShelfModel. (Closed)
Patch Set: Address comment. Created 3 years, 8 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: 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 cbd7890badc91b7983db6e3bdd212907463d2172..825c43d00d055fb426d7781b6bb39dcd41df61c0 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" // nogncheck
-#include "ash/shell.h" // nogncheck
+#include "ash/shelf/shelf_model.h" // nogncheck
+#include "ash/shell.h" // nogncheck
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" // nogncheck
#endif
@@ -89,8 +89,7 @@ void AppInfoFooterPanel::LayoutButtons() {
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::Get()->shelf_delegate()->IsAppPinned(app_->id());
+ bool is_pinned = !ash::Shell::Get()->shelf_model()->IsAppPinned(app_->id());
pin_to_shelf_button_->SetVisible(is_pinned);
unpin_from_shelf_button_->SetVisible(!is_pinned);
@@ -152,12 +151,12 @@ bool AppInfoFooterPanel::CanCreateShortcuts() const {
#if defined(USE_ASH)
void AppInfoFooterPanel::SetPinnedToShelf(bool value) {
DCHECK(CanSetPinnedToShelf());
- ash::ShelfDelegate* shelf_delegate = ash::Shell::Get()->shelf_delegate();
- DCHECK(shelf_delegate);
+ ash::ShelfModel* shelf_model = ash::Shell::Get()->shelf_model();
+ DCHECK(shelf_model);
if (value)
- shelf_delegate->PinAppWithID(app_->id());
+ shelf_model->PinAppWithID(app_->id());
else
- shelf_delegate->UnpinAppWithID(app_->id());
+ shelf_model->UnpinAppWithID(app_->id());
UpdatePinButtons(true);
Layout();
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc ('k') | chrome/test/base/browser_with_test_window_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698