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 #ifndef ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_
6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_
10 #include "athena/athena_export.h"
25 class ATHENA_EXPORT ActivityFactory
{
27 // Registers the singleton factory.
28 static void RegisterActivityFactory(ActivityFactory
* factory
);
30 // Gets the registered singleton factory.
31 static ActivityFactory
* Get();
33 // Shutdowns the factory.
34 static void Shutdown();
36 virtual ~ActivityFactory() {}
38 // Create an activity of a web page. If |title| is empty, the title will be
39 // obtained from the web contents.
40 virtual Activity
* CreateWebActivity(content::BrowserContext
* browser_context
,
41 const base::string16
& title
,
44 // Create an activity with |contents|. The title is obtained from the web
46 virtual Activity
* CreateWebActivity(content::WebContents
* contents
) = 0;
48 // Create an activity of an app with |app_id| and
49 // |web_view| that will host the content.
50 virtual Activity
* CreateAppActivity(const std::string
& app_id
,
51 views::WebView
* web_view
) = 0;
56 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_