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

Unified Diff: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.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
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 ecda73fc32133defb73bf22fa62beab771da4269..6a705166ee526033ec1b191e8ea1e336c3d64c63 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
@@ -6,10 +6,10 @@
#include <vector>
+#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/shelf/shelf_model.h"
-#include "ash/shelf/shelf_delegate.h"
+#include "ash/common/wm_shell.h"
#include "ash/shelf/shelf_util.h"
-#include "ash/shell.h"
#include "ash/wm/window_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
@@ -72,11 +72,6 @@ BrowserShortcutLauncherItemController::
}
void BrowserShortcutLauncherItemController::UpdateBrowserItemState() {
- // The shell will not be available for win7_aura unittests like
- // ChromeLauncherControllerTest.BrowserMenuGeneration.
- if (!ash::Shell::HasInstance())
- return;
-
// Determine the new browser's active state and change if necessary.
int browser_index =
shelf_model_->GetItemIndexForType(ash::TYPE_BROWSER_SHORTCUT);
@@ -338,9 +333,8 @@ bool BrowserShortcutLauncherItemController::IsBrowserRepresentedInBrowserList(
return false;
// v1 App popup windows with a valid app id have their own icon.
- if (browser->is_app() &&
- browser->is_type_popup() &&
- ash::Shell::GetInstance()->GetShelfDelegate()->GetShelfIDForAppID(
+ if (browser->is_app() && browser->is_type_popup() &&
+ ash::WmShell::Get()->shelf_delegate()->GetShelfIDForAppID(
web_app::GetExtensionIdFromApplicationName(browser->app_name())) > 0)
return false;

Powered by Google App Engine
This is Rietveld 408576698