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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 static void RegisterActivityFactory(ActivityFactory* factory); | 26 static void RegisterActivityFactory(ActivityFactory* factory); |
27 | 27 |
28 // Gets the registered singleton factory. | 28 // Gets the registered singleton factory. |
29 static ActivityFactory* Get(); | 29 static ActivityFactory* Get(); |
30 | 30 |
31 // Shutdowns the factory. | 31 // Shutdowns the factory. |
32 static void Shutdown(); | 32 static void Shutdown(); |
33 | 33 |
34 virtual ~ActivityFactory() {} | 34 virtual ~ActivityFactory() {} |
35 | 35 |
36 // Create an activity of a web page. | 36 // Create an activity of a web page. If |title| is empty, the title will be |
| 37 // obtained from the web contents. |
37 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, | 38 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, |
| 39 const base::string16& title, |
38 const GURL& url) = 0; | 40 const GURL& url) = 0; |
39 | 41 |
40 // Create an activity of an app with |app_window| for app shell environemnt. | 42 // Create an activity of an app with |app_window| for app shell environemnt. |
41 // The returned activity should own |app_window|. | 43 // The returned activity should own |app_window|. |
42 // TODO(oshima): Consolidate these two methods to create AppActivity | 44 // TODO(oshima): Consolidate these two methods to create AppActivity |
43 // once crbug.com/403726 is finished. | 45 // once crbug.com/403726 is finished. |
44 virtual Activity* CreateAppActivity(extensions::ShellAppWindow* app_window, | 46 virtual Activity* CreateAppActivity(extensions::ShellAppWindow* app_window, |
45 const std::string& id) = 0; | 47 const std::string& id) = 0; |
46 | 48 |
47 // Create an activity of an app with |app_window| for chrome environment. | 49 // Create an activity of an app with |app_window| for chrome environment. |
48 virtual Activity* CreateAppActivity(extensions::AppWindow* app_window) = 0; | 50 virtual Activity* CreateAppActivity(extensions::AppWindow* app_window) = 0; |
49 }; | 51 }; |
50 | 52 |
51 } // namespace athena | 53 } // namespace athena |
52 | 54 |
53 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ | 55 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ |
OLD | NEW |