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

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

Issue 311113005: AppModelBuilder to athena. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 6 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
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_activity_factory.h" 5 #include "athena/content/public/content_activity_factory.h"
6 6
7 #include "athena/content/web_activity.h" 7 #include "athena/content/web_activity.h"
8 8
9 namespace athena { 9 namespace athena {
10 10
11 ContentActivityFactory::ContentActivityFactory() { 11 ContentActivityFactory::ContentActivityFactory() {
12 } 12 }
13 13
14 ContentActivityFactory::~ContentActivityFactory() {} 14 ContentActivityFactory::~ContentActivityFactory() {}
15 15
16 Activity* ContentActivityFactory::CreateWebActivity( 16 Activity* ContentActivityFactory::CreateWebActivity(
17 content::BrowserContext* browser_context, 17 content::BrowserContext* browser_context,
18 const GURL& url) { 18 const GURL& url) {
19 return new WebActivity(browser_context, url); 19 return new WebActivity(browser_context, url);
20 } 20 }
21 21
22 Activity* ContentActivityFactory::CreateAppActivity(
23 content::BrowserContext* browser_context,
24 const std::string& app_id) {
25 // TODO(mukai): port the extension system and launch the app actually.
26 GURL url;
27 if (app_id == "mail")
28 url = GURL("https://mail.google.com/");
29 else if (app_id == "calendar")
30 url = GURL("https://calendar.google.com/");
31 else if (app_id == "video")
32 url = GURL("http://youtube.com/");
33 else if (app_id == "music")
34 url = GURL("https://play.google.com/music");
35 else if (app_id == "contact")
36 url = GURL("https://contact.google.com/");
37 else
38 LOG(FATAL) << "Unknown app id: " << app_id;
39 DCHECK(!url.is_empty());
40 return CreateWebActivity(browser_context, url);
41 }
42
22 } // namespace athena 43 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698