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

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

Issue 2039253002: Removing ash::Shelf::shelf_model() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_controller_shelf_model_2
Patch Set: Another rebase. Created 4 years, 6 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_launcher_context_menu.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc
diff --git a/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc
index 9f2f4f9b217043d1e8d9affa2e747056b28f2a60..099127eda54a9c67babc9404ecbc52e3b4515696 100644
--- a/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/extension_launcher_context_menu.cc
@@ -6,6 +6,7 @@
#include "ash/common/shelf/shelf_item_delegate.h"
#include "ash/shelf/shelf.h"
+#include "ash/shell.h"
#include "base/bind.h"
#include "chrome/browser/extensions/context_menu_matcher.h"
#include "chrome/browser/extensions/extension_util.h"
@@ -19,10 +20,6 @@
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
-namespace ash {
-class ShelfModel;
-}
-
namespace {
bool MenuItemHasLauncherContext(const extensions::MenuItem* item) {
@@ -35,8 +32,7 @@ ExtensionLauncherContextMenu::ExtensionLauncherContextMenu(
ChromeLauncherController* controller,
const ash::ShelfItem* item,
ash::Shelf* shelf)
- : LauncherContextMenu(controller, item, shelf),
- shelf_model_(shelf->shelf_model()) {
+ : LauncherContextMenu(controller, item, shelf) {
Init();
}
@@ -85,7 +81,8 @@ void ExtensionLauncherContextMenu::Init() {
AddItemWithStringId(MENU_NEW_INCOGNITO_WINDOW,
IDS_APP_LIST_NEW_INCOGNITO_WINDOW);
}
- if (!BrowserShortcutLauncherItemController(controller(), shelf_model_)
+ if (!BrowserShortcutLauncherItemController(
+ controller(), ash::Shell::GetInstance()->shelf_model())
.IsListOfActiveBrowserEmpty()) {
AddItem(MENU_CLOSE,
l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
« no previous file with comments | « chrome/browser/ui/ash/launcher/extension_launcher_context_menu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698