Use SkCanvas::drawImageRect() instead of SkImage::draw()
[chromium-blink-merge.git] / athena / content / content_activity_factory.cc
blob2d8867e601cf8ea16923c44a0a71da1743720315
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"
12 namespace athena {
14 ContentActivityFactory::ContentActivityFactory() {
17 ContentActivityFactory::~ContentActivityFactory() {}
19 Activity* ContentActivityFactory::CreateWebActivity(
20 content::BrowserContext* browser_context,
21 const base::string16& title,
22 const GURL& url) {
23 Activity* activity = new WebActivity(browser_context, title, url);
24 ActivityManager::Get()->AddActivity(activity);
25 return 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);
33 return activity;
36 ActivityFactory* CreateContentActivityFactory() {
37 return new ContentActivityFactory();
40 } // namespace athena