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

Unified Diff: ash/common/shelf/app_list_shelf_item_delegate.cc

Issue 2169533002: mash: Migrate shelf app list button to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move files, cleanup 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: ash/common/shelf/app_list_shelf_item_delegate.cc
diff --git a/ash/shelf/app_list_shelf_item_delegate.cc b/ash/common/shelf/app_list_shelf_item_delegate.cc
similarity index 84%
rename from ash/shelf/app_list_shelf_item_delegate.cc
rename to ash/common/shelf/app_list_shelf_item_delegate.cc
index c9f4007fe766c0735f58a160255df40491f96fed..ce1b5e3440120bce55121defca633f68a730a377 100644
--- a/ash/shelf/app_list_shelf_item_delegate.cc
+++ b/ash/common/shelf/app_list_shelf_item_delegate.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/shelf/app_list_shelf_item_delegate.h"
+#include "ash/common/shelf/app_list_shelf_item_delegate.h"
#include "ash/common/shelf/shelf_model.h"
-#include "ash/shell.h"
+#include "ash/common/wm_shell.h"
#include "grit/ash_strings.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/base/l10n/l10n_util.h"
@@ -15,7 +15,7 @@ namespace ash {
AppListShelfItemDelegate::AppListShelfItemDelegate() {
ShelfItem app_list;
app_list.type = TYPE_APP_LIST;
- Shell::GetInstance()->shelf_model()->Add(app_list);
+ WmShell::Get()->shelf_model()->Add(app_list);
}
AppListShelfItemDelegate::~AppListShelfItemDelegate() {
@@ -24,13 +24,12 @@ AppListShelfItemDelegate::~AppListShelfItemDelegate() {
ShelfItemDelegate::PerformedAction AppListShelfItemDelegate::ItemSelected(
const ui::Event& event) {
- // Pass NULL here to show the app list in the currently active RootWindow.
- Shell::GetInstance()->ToggleAppList(NULL);
+ WmShell::Get()->ToggleAppList();
return ShelfItemDelegate::kAppListMenuShown;
}
base::string16 AppListShelfItemDelegate::GetTitle() {
- ShelfModel* model = Shell::GetInstance()->shelf_model();
+ ShelfModel* model = WmShell::Get()->shelf_model();
DCHECK(model);
int title_id;
if (app_list::switches::IsExperimentalAppListEnabled()) {

Powered by Google App Engine
This is Rietveld 408576698