Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / athena / content / content_activity_factory.cc
index 65747dc..2d8867e 100644 (file)
@@ -2,8 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "athena/content/public/content_activity_factory.h"
+#include "athena/content/content_activity_factory.h"
 
+#include "athena/activity/public/activity_manager.h"
 #include "athena/content/app_activity.h"
 #include "athena/content/web_activity.h"
 #include "base/logging.h"
@@ -17,13 +18,23 @@ ContentActivityFactory::~ContentActivityFactory() {}
 
 Activity* ContentActivityFactory::CreateWebActivity(
     content::BrowserContext* browser_context,
+    const base::string16& title,
     const GURL& url) {
-  return new WebActivity(browser_context, url);
+  Activity* activity = new WebActivity(browser_context, title, url);
+  ActivityManager::Get()->AddActivity(activity);
+  return activity;
 }
 
 Activity* ContentActivityFactory::CreateAppActivity(
-    extensions::ShellAppWindow* app_window) {
-  return new AppActivity(app_window);
+    extensions::AppWindow* app_window,
+    views::WebView* web_view) {
+  Activity* activity = new AppActivity(app_window, web_view);
+  ActivityManager::Get()->AddActivity(activity);
+  return activity;
+}
+
+ActivityFactory* CreateContentActivityFactory() {
+  return new ContentActivityFactory();
 }
 
 }  // namespace athena