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 AppWindow; | |
13 } | |
14 | |
11 namespace content { | 15 namespace content { |
12 class BrowserContext; | 16 class BrowserContext; |
13 } | 17 } |
14 | 18 |
15 namespace extensions { | 19 namespace extensions { |
16 class ShellAppWindow; | 20 class ShellAppWindow; |
17 } | 21 } |
18 | 22 |
19 namespace athena { | 23 namespace athena { |
20 class Activity; | 24 class Activity; |
21 | 25 |
22 class ATHENA_EXPORT ActivityFactory { | 26 class ATHENA_EXPORT ActivityFactory { |
23 public: | 27 public: |
24 // Registers the singleton factory. | 28 // Registers the singleton factory. |
25 static void RegisterActivityFactory(ActivityFactory* factory); | 29 static void RegisterActivityFactory(ActivityFactory* factory); |
26 | 30 |
27 // Gets the registered singleton factory. | 31 // Gets the registered singleton factory. |
28 static ActivityFactory* Get(); | 32 static ActivityFactory* Get(); |
29 | 33 |
30 // Shutdowns the factory. | 34 // Shutdowns the factory. |
31 static void Shutdown(); | 35 static void Shutdown(); |
32 | 36 |
33 virtual ~ActivityFactory() {} | 37 virtual ~ActivityFactory() {} |
34 | 38 |
35 // Create an activity of a web page. | 39 // Create an activity of a web page. |
36 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, | 40 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, |
37 const GURL& url) = 0; | 41 const GURL& url) = 0; |
38 | 42 |
39 // Create an activity of an app with |app_window|. The returned activity | 43 // Create an activity of an app with |app_window| for app shell environemnt. |
40 // should own |app_window|. | 44 // The returned activity should own |app_window|. |
Jun Mukai
2014/08/26 21:28:23
Please comment that this method will be removed on
oshima
2014/08/26 21:43:27
Done.
| |
41 virtual Activity* CreateAppActivity( | 45 virtual Activity* CreateAppActivity( |
42 extensions::ShellAppWindow* app_window) = 0; | 46 extensions::ShellAppWindow* app_window) = 0; |
47 | |
48 // Create an activity of an app with |app_window| for chrome environment. | |
49 virtual Activity* CreateAppActivity(apps::AppWindow* app_window) = 0; | |
43 }; | 50 }; |
44 | 51 |
45 } // namespace athena | 52 } // namespace athena |
46 | 53 |
47 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ | 54 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ |
OLD | NEW |