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

Unified Diff: ash/shelf/app_list_shelf_item_delegate.cc

Issue 2833173002: mash: Support ShelfModel access in Chrome. (Closed)
Patch Set: Address comments; fix test failures. Created 3 years, 7 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/shelf/app_list_shelf_item_delegate.cc
diff --git a/ash/shelf/app_list_shelf_item_delegate.cc b/ash/shelf/app_list_shelf_item_delegate.cc
index 76361cd9b818719e30a322b72ebc3eedbabb2e9d..3783580a1836500cfe325172f40bfddaebf8cb90 100644
--- a/ash/shelf/app_list_shelf_item_delegate.cc
+++ b/ash/shelf/app_list_shelf_item_delegate.cc
@@ -8,36 +8,9 @@
#include "ash/shelf/shelf_model.h"
#include "ash/shell.h"
-#include "ash/strings/grit/ash_strings.h"
-#include "base/memory/ptr_util.h"
-#include "ui/app_list/app_list_switches.h"
-#include "ui/base/l10n/l10n_util.h"
namespace ash {
-namespace {
-
-// An app id for the app list, used to identify the shelf item.
-// Generated as crx_file::id_util::GenerateId("org.chromium.applist")
-static constexpr char kAppListId[] = "jlfapfmkapbjlfbpjedlinehodkccjee";
-
-} // namespace
-
-// static
-void AppListShelfItemDelegate::CreateAppListItemAndDelegate(ShelfModel* model) {
- // Add the app list item to the shelf model.
- ShelfItem item;
- item.type = TYPE_APP_LIST;
- item.id = ShelfID(kAppListId);
- item.title = l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE);
- int index = model->Add(item);
- DCHECK_GE(index, 0);
-
- // Create an AppListShelfItemDelegate for that item.
- model->SetShelfItemDelegate(item.id,
- base::MakeUnique<AppListShelfItemDelegate>());
-}
-
AppListShelfItemDelegate::AppListShelfItemDelegate()
: ShelfItemDelegate(ShelfID(kAppListId)) {}

Powered by Google App Engine
This is Rietveld 408576698