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

Unified Diff: athena/extensions/extension_app_model_builder.cc

Issue 583503003: Simply remove dummy app icons from the home card. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | athena/home/athena_start_page_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/extensions/extension_app_model_builder.cc
diff --git a/athena/extensions/extension_app_model_builder.cc b/athena/extensions/extension_app_model_builder.cc
index 0aa5c6e9ab54d1002f20f15e5406c4826af94553..a59dd7d1eaabfb8dc56a5e180fd4eaff7c4a9263 100644
--- a/athena/extensions/extension_app_model_builder.cc
+++ b/athena/extensions/extension_app_model_builder.cc
@@ -20,43 +20,6 @@ namespace athena {
namespace {
-gfx::ImageSkia CreateFlatColorImage(SkColor color) {
- SkBitmap bitmap;
- bitmap.allocN32Pixels(extension_misc::EXTENSION_ICON_MEDIUM,
- extension_misc::EXTENSION_ICON_MEDIUM);
- bitmap.eraseColor(color);
- return gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
-}
-
-// Same dummy item.
-class DummyItem : public app_list::AppListItem {
- public:
- DummyItem(const std::string& id,
- const GURL& url,
- SkColor color,
- content::BrowserContext* browser_context)
- : app_list::AppListItem(id),
- url_(url),
- browser_context_(browser_context) {
-
- SetIcon(CreateFlatColorImage(color), false /* has_shadow */);
- SetName(id);
- }
-
- private:
- // Overridden from app_list::AppListItem:
- virtual void Activate(int event_flags) OVERRIDE {
- ActivityManager::Get()->AddActivity(
- ActivityFactory::Get()->CreateWebActivity(
- browser_context_, base::string16(), url_));
- }
-
- GURL url_;
- content::BrowserContext* browser_context_;
-
- DISALLOW_COPY_AND_ASSIGN(DummyItem);
-};
-
class AppItem : public app_list::AppListItem {
public:
AppItem(scoped_refptr<const extensions::Extension> extension,
@@ -111,20 +74,6 @@ void ExtensionAppModelBuilder::PopulateApps(app_list::AppListModel* model) {
new AppItem(*iter, browser_context_)));
}
}
-
- model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
- "mail", GURL("http://gmail.com/"), SK_ColorRED, browser_context_)));
- model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
- "calendar", GURL("https://calendar.google.com/"),
- SK_ColorBLUE, browser_context_)));
- model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
- "video", GURL("http://youtube.com/"), SK_ColorGREEN, browser_context_)));
- model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
- "music", GURL("http://play.google.com/music"),
- SK_ColorYELLOW, browser_context_)));
- model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
- "contact", GURL("https://www.google.com/contacts"),
- SK_ColorCYAN, browser_context_)));
}
} // namespace athena
« no previous file with comments | « no previous file | athena/home/athena_start_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698