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

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

Issue 544813002: Support V1 app (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 unified diff | Download patch
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 "athena/extensions/public/extensions_delegate.h" 9 #include "athena/extensions/public/extensions_delegate.h"
10 #include "extensions/browser/extension_icon_image.h" 10 #include "extensions/browser/extension_icon_image.h"
(...skipping 27 matching lines...) Expand all
38 browser_context_(browser_context) { 38 browser_context_(browser_context) {
39 39
40 SetIcon(CreateFlatColorImage(color), false /* has_shadow */); 40 SetIcon(CreateFlatColorImage(color), false /* has_shadow */);
41 SetName(id); 41 SetName(id);
42 } 42 }
43 43
44 private: 44 private:
45 // Overridden from app_list::AppListItem: 45 // Overridden from app_list::AppListItem:
46 virtual void Activate(int event_flags) OVERRIDE { 46 virtual void Activate(int event_flags) OVERRIDE {
47 ActivityManager::Get()->AddActivity( 47 ActivityManager::Get()->AddActivity(
48 ActivityFactory::Get()->CreateWebActivity(browser_context_, url_)); 48 ActivityFactory::Get()->CreateWebActivity(
49 browser_context_, base::string16(), url_));
49 } 50 }
50 51
51 GURL url_; 52 GURL url_;
52 content::BrowserContext* browser_context_; 53 content::BrowserContext* browser_context_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(DummyItem); 55 DISALLOW_COPY_AND_ASSIGN(DummyItem);
55 }; 56 };
56 57
57 class AppItem : public app_list::AppListItem { 58 class AppItem : public app_list::AppListItem {
58 public: 59 public:
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 "video", GURL("http://youtube.com/"), SK_ColorGREEN, browser_context_))); 119 "video", GURL("http://youtube.com/"), SK_ColorGREEN, browser_context_)));
119 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem( 120 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
120 "music", GURL("http://play.google.com/music"), 121 "music", GURL("http://play.google.com/music"),
121 SK_ColorYELLOW, browser_context_))); 122 SK_ColorYELLOW, browser_context_)));
122 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem( 123 model->AddItem(scoped_ptr<app_list::AppListItem>(new DummyItem(
123 "contact", GURL("https://www.google.com/contacts"), 124 "contact", GURL("https://www.google.com/contacts"),
124 SK_ColorCYAN, browser_context_))); 125 SK_ColorCYAN, browser_context_)));
125 } 126 }
126 127
127 } // namespace athena 128 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698