Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / athena / content / content_activity_factory.cc
index 2d8867e..f6b3dd8 100644 (file)
@@ -8,6 +8,7 @@
 #include "athena/content/app_activity.h"
 #include "athena/content/web_activity.h"
 #include "base/logging.h"
+#include "ui/aura/window.h"
 
 namespace athena {
 
@@ -22,14 +23,23 @@ Activity* ContentActivityFactory::CreateWebActivity(
     const GURL& url) {
   Activity* activity = new WebActivity(browser_context, title, url);
   ActivityManager::Get()->AddActivity(activity);
+  activity->GetWindow()->SetName("WebActivity");
+  return activity;
+}
+
+Activity* ContentActivityFactory::CreateWebActivity(
+    content::WebContents* contents) {
+  Activity* activity = new WebActivity(contents);
+  ActivityManager::Get()->AddActivity(activity);
   return activity;
 }
 
 Activity* ContentActivityFactory::CreateAppActivity(
-    extensions::AppWindow* app_window,
+    const std::string& app_id,
     views::WebView* web_view) {
-  Activity* activity = new AppActivity(app_window, web_view);
+  Activity* activity = new AppActivity(app_id, web_view);
   ActivityManager::Get()->AddActivity(activity);
+  activity->GetWindow()->SetName("AppActivity");
   return activity;
 }