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

Unified Diff: ash/public/cpp/shelf_model.cc

Issue 2917013002: mash: Move ShelfModel* to ash/public/cpp. (Closed)
Patch Set: Comment on AppList item init. 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
« no previous file with comments | « ash/public/cpp/shelf_model.h ('k') | ash/public/cpp/shelf_model_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/public/cpp/shelf_model.cc
diff --git a/ash/shelf/shelf_model.cc b/ash/public/cpp/shelf_model.cc
similarity index 96%
rename from ash/shelf/shelf_model.cc
rename to ash/public/cpp/shelf_model.cc
index 3aa6ade522916bbcd7f9c466d2f82945d1b87ced..73b8b425af603e3af4574f4841a9dba25b291a93 100644
--- a/ash/shelf/shelf_model.cc
+++ b/ash/public/cpp/shelf_model.cc
@@ -2,14 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/shelf/shelf_model.h"
+#include "ash/public/cpp/shelf_model.h"
#include <algorithm>
#include "ash/public/cpp/shelf_item_delegate.h"
-#include "ash/shelf/shelf_model_observer.h"
-#include "ash/strings/grit/ash_strings.h"
-#include "ui/base/l10n/l10n_util.h"
+#include "ash/public/cpp/shelf_model_observer.h"
namespace ash {
@@ -48,11 +46,11 @@ bool CompareByWeight(const ShelfItem& a, const ShelfItem& b) {
const char kAppListId[] = "jlfapfmkapbjlfbpjedlinehodkccjee";
ShelfModel::ShelfModel() {
- // Add the app list item.
+ // Add the app list item; its title and delegate are set in ShelfController.
+ // This avoids an ash/public dep on ash/strings, and a Chrome-side delegate.
ShelfItem item;
item.type = TYPE_APP_LIST;
item.id = ShelfID(kAppListId);
- item.title = l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE);
const int index = Add(item);
DCHECK_EQ(0, index);
}
« no previous file with comments | « ash/public/cpp/shelf_model.h ('k') | ash/public/cpp/shelf_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698