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 apps { | |
12 class ShellAppWindow; | |
13 } | |
14 | |
15 namespace content { | 11 namespace content { |
16 class BrowserContext; | 12 class BrowserContext; |
17 } | 13 } |
18 | 14 |
| 15 namespace extensions { |
| 16 class ShellAppWindow; |
| 17 } |
| 18 |
19 namespace athena { | 19 namespace athena { |
20 class Activity; | 20 class Activity; |
21 | 21 |
22 class ATHENA_EXPORT ActivityFactory { | 22 class ATHENA_EXPORT ActivityFactory { |
23 public: | 23 public: |
24 // Registers the singleton factory. | 24 // Registers the singleton factory. |
25 static void RegisterActivityFactory(ActivityFactory* factory); | 25 static void RegisterActivityFactory(ActivityFactory* factory); |
26 | 26 |
27 // Gets the registered singleton factory. | 27 // Gets the registered singleton factory. |
28 static ActivityFactory* Get(); | 28 static ActivityFactory* Get(); |
29 | 29 |
30 // Shutdowns the factory. | 30 // Shutdowns the factory. |
31 static void Shutdown(); | 31 static void Shutdown(); |
32 | 32 |
33 virtual ~ActivityFactory() {} | 33 virtual ~ActivityFactory() {} |
34 | 34 |
35 // Create an activity of a web page. | 35 // Create an activity of a web page. |
36 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, | 36 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, |
37 const GURL& url) = 0; | 37 const GURL& url) = 0; |
38 | 38 |
39 // Create an activity of an app with |app_window|. The returned activity | 39 // Create an activity of an app with |app_window|. The returned activity |
40 // should own |app_window|. | 40 // should own |app_window|. |
41 virtual Activity* CreateAppActivity(apps::ShellAppWindow* app_window) = 0; | 41 virtual Activity* CreateAppActivity( |
| 42 extensions::ShellAppWindow* app_window) = 0; |
42 }; | 43 }; |
43 | 44 |
44 } // namespace athena | 45 } // namespace athena |
45 | 46 |
46 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ | 47 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ |
OLD | NEW |