Index: athena/content/content_activity_factory.cc |
diff --git a/athena/content/content_activity_factory.cc b/athena/content/content_activity_factory.cc |
index 9486d1fef32bdc501cb5b84a344d78c081f188cb..e9af624ebb5e09f4fc2ba06dea01a725fa1eb089 100644 |
--- a/athena/content/content_activity_factory.cc |
+++ b/athena/content/content_activity_factory.cc |
@@ -19,4 +19,25 @@ Activity* ContentActivityFactory::CreateWebActivity( |
return new WebActivity(browser_context, url); |
} |
+Activity* ContentActivityFactory::CreateAppActivity( |
+ content::BrowserContext* browser_context, |
+ const std::string& app_id) { |
+ // TODO(mukai): port the extension system and launch the app actually. |
+ GURL url; |
+ if (app_id == "mail") |
+ url = GURL("https://mail.google.com/"); |
+ else if (app_id == "calendar") |
+ url = GURL("https://calendar.google.com/"); |
+ else if (app_id == "video") |
+ url = GURL("http://youtube.com/"); |
+ else if (app_id == "music") |
+ url = GURL("https://play.google.com/music"); |
+ else if (app_id == "contact") |
+ url = GURL("https://contact.google.com/"); |
+ else |
+ LOG(FATAL) << "Unknown app id: " << app_id; |
+ DCHECK(!url.is_empty()); |
+ return CreateWebActivity(browser_context, url); |
+} |
+ |
} // namespace athena |