OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |