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
3 // found in the LICENSE file.
5 #include "athena/content/content_activity_factory.h"
7 #include "athena/activity/public/activity_manager.h"
8 #include "athena/content/app_activity.h"
9 #include "athena/content/web_activity.h"
10 #include "base/logging.h"
14 ContentActivityFactory::ContentActivityFactory() {
17 ContentActivityFactory::~ContentActivityFactory() {}
19 Activity
* ContentActivityFactory::CreateWebActivity(
20 content::BrowserContext
* browser_context
,
21 const base::string16
& title
,
23 Activity
* activity
= new WebActivity(browser_context
, title
, url
);
24 ActivityManager::Get()->AddActivity(activity
);
28 Activity
* ContentActivityFactory::CreateAppActivity(
29 extensions::AppWindow
* app_window
,
30 views::WebView
* web_view
) {
31 Activity
* activity
= new AppActivity(app_window
, web_view
);
32 ActivityManager::Get()->AddActivity(activity
);
36 ActivityFactory
* CreateContentActivityFactory() {
37 return new ContentActivityFactory();