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

Unified Diff: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc

Issue 2791463002: mash: Remove ShelfDelegate; move functions to ShelfModel. (Closed)
Patch Set: Sync and rebase; cleanup. 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/ash/launcher/browser_shortcut_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
index 0ef6011d817174399c4f0dd0e54a1ab232695d9a..0c5dbdbf3e7f6d836f90bb15f385f793fd908cf0 100644
--- a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
@@ -8,7 +8,6 @@
#include <vector>
#include "ash/resources/grit/ash_resources.h"
-#include "ash/shelf/shelf_delegate.h"
#include "ash/shelf/shelf_model.h"
#include "ash/shell.h"
#include "ash/wm/window_properties.h"
@@ -361,9 +360,9 @@ bool BrowserShortcutLauncherItemController::IsBrowserRepresentedInBrowserList(
return false;
// v1 App popup windows with a valid app id have their own icon.
- ash::ShelfDelegate* delegate = ash::Shell::Get()->shelf_delegate();
- if (browser->is_app() && browser->is_type_popup() && delegate &&
- delegate->GetShelfIDForAppID(web_app::GetExtensionIdFromApplicationName(
+ ash::ShelfModel* model = ash::Shell::Get()->shelf_model();
+ if (browser->is_app() && browser->is_type_popup() && model &&
James Cook 2017/04/19 00:23:47 I don't think you need the null check, since Shell
msw 2017/04/19 20:56:07 Done.
+ model->GetShelfIDForAppID(web_app::GetExtensionIdFromApplicationName(
browser->app_name())) > 0) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698