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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/content/DEPS ('k') | athena/content/content_app_model_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4f74909164eeea342f25b7ff118e7e9a70bf29f0 100644
--- a/athena/content/content_activity_factory.cc
+++ b/athena/content/content_activity_factory.cc
@@ -5,6 +5,7 @@
#include "athena/content/public/content_activity_factory.h"
#include "athena/content/web_activity.h"
+#include "base/logging.h"
namespace athena {
@@ -19,4 +20,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://www.google.com/contacts");
+ else
+ LOG(FATAL) << "Unknown app id: " << app_id;
+ DCHECK(!url.is_empty());
+ return CreateWebActivity(browser_context, url);
+}
+
} // namespace athena
« no previous file with comments | « athena/content/DEPS ('k') | athena/content/content_app_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698