Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ | 5 #ifndef ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ |
| 6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ | 6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ |
| 7 | 7 |
| 8 #include "athena/athena_export.h" | 8 #include "athena/athena_export.h" |
| 9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 class BrowserContext; | 12 class BrowserContext; |
| 13 class WebContents; | |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace athena { | 16 namespace athena { |
| 16 class Activity; | 17 class Activity; |
| 17 | 18 |
| 18 class ATHENA_EXPORT ActivityFactory { | 19 class ATHENA_EXPORT ActivityFactory { |
| 19 public: | 20 public: |
| 20 // Registers the singleton factory. | 21 // Registers the singleton factory. |
| 21 static void RegisterActivityFactory(ActivityFactory* factory); | 22 static void RegisterActivityFactory(ActivityFactory* factory); |
| 22 | 23 |
| 23 // Gets the registered singleton factory. | 24 // Gets the registered singleton factory. |
| 24 static ActivityFactory* Get(); | 25 static ActivityFactory* Get(); |
| 25 | 26 |
| 26 // Shutdowns the factory. | 27 // Shutdowns the factory. |
| 27 static void Shutdown(); | 28 static void Shutdown(); |
| 28 | 29 |
| 29 virtual ~ActivityFactory() {} | 30 virtual ~ActivityFactory() {} |
| 30 | 31 |
| 31 // Create an activity of a web page. | 32 // Create an activity of a web page. |
| 32 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, | 33 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, |
| 33 const GURL& url) = 0; | 34 const GURL& url) = 0; |
| 34 | 35 |
| 35 // Create an activity of an app. | 36 // Create an activity of an app with |web_contents|. |
| 36 virtual Activity* CreateAppActivity(content::BrowserContext* browser_context, | 37 virtual Activity* CreateAppActivity(content::WebContents* web_contents) = 0; |
|
James Cook
2014/06/16 16:12:30
Not for this CL: Will Athena ever support multi-p
Jun Mukai
2014/06/16 17:46:52
I think eventually it will, but not now.
| |
| 37 const std::string& app_id) = 0; | |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace athena | 40 } // namespace athena |
| 41 | 41 |
| 42 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ | 42 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ |
| OLD | NEW |