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

Side by Side Diff: athena/content/content_app_model_builder.cc

Issue 470713002: Reorder the app order. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/content/public/content_app_model_builder.h" 5 #include "athena/content/public/content_app_model_builder.h"
6 6
7 #include "athena/activity/public/activity_factory.h" 7 #include "athena/activity/public/activity_factory.h"
8 #include "athena/activity/public/activity_manager.h" 8 #include "athena/activity/public/activity_manager.h"
9 #include "extensions/browser/extension_icon_image.h" 9 #include "extensions/browser/extension_icon_image.h"
10 #include "extensions/common/constants.h" 10 #include "extensions/common/constants.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 ContentAppModelBuilder::ContentAppModelBuilder( 101 ContentAppModelBuilder::ContentAppModelBuilder(
102 content::BrowserContext* browser_context) 102 content::BrowserContext* browser_context)
103 : browser_context_(browser_context) { 103 : browser_context_(browser_context) {
104 } 104 }
105 105
106 ContentAppModelBuilder::~ContentAppModelBuilder() { 106 ContentAppModelBuilder::~ContentAppModelBuilder() {
107 } 107 }
108 108
109 void ContentAppModelBuilder::PopulateApps(app_list::AppListModel* model) { 109 void ContentAppModelBuilder::PopulateApps(app_list::AppListModel* model) {
110 ShellExtensionSystem* extension_system =
111 GetShellExtensionSystem(browser_context_);
112 if (extension_system && extension_system->extension()) {
113 model->AddItem(scoped_ptr<app_list::AppListItem>(
114 new AppItem(extension_system->extension(), browser_context_)));
115 }
116
110 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem( 117 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
111 "mail", GURL("http://gmail.com/"), SK_ColorRED, browser_context_))); 118 "mail", GURL("http://gmail.com/"), SK_ColorRED, browser_context_)));
112 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem( 119 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
113 "calendar", GURL("https://calendar.google.com/"), 120 "calendar", GURL("https://calendar.google.com/"),
114 SK_ColorBLUE, browser_context_))); 121 SK_ColorBLUE, browser_context_)));
115 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem( 122 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
116 "video", GURL("http://youtube.com/"), SK_ColorGREEN, browser_context_))); 123 "video", GURL("http://youtube.com/"), SK_ColorGREEN, browser_context_)));
117 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem( 124 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
118 "music", GURL("http://play.google.com/music"), 125 "music", GURL("http://play.google.com/music"),
119 SK_ColorYELLOW, browser_context_))); 126 SK_ColorYELLOW, browser_context_)));
120 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem( 127 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
121 "contact", GURL("https://www.google.com/contacts"), 128 "contact", GURL("https://www.google.com/contacts"),
122 SK_ColorCYAN, browser_context_))); 129 SK_ColorCYAN, browser_context_)));
123
124 ShellExtensionSystem* extension_system =
125 GetShellExtensionSystem(browser_context_);
126 if (extension_system && extension_system->extension()) {
127 model->AddItem(scoped_ptr<app_list::AppListItem>(
128 new AppItem(extension_system->extension(), browser_context_)));
129 }
130 } 130 }
131 131
132 } // namespace athena 132 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698