Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: athena/activity/public/activity_factory.h

Issue 571643003: Remove app_shell chrome.shell API and ShellAppWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (remove-shell) rebase 2 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | athena/content/chrome/content_activity_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 } 13 }
14 14
15 namespace extensions { 15 namespace extensions {
16 class AppWindow; 16 class AppWindow;
17 class ShellAppWindow;
18 } 17 }
19 18
20 namespace views { 19 namespace views {
21 class WebView; 20 class WebView;
22 } 21 }
23 22
24 namespace athena { 23 namespace athena {
25 class Activity; 24 class Activity;
26 25
27 class ATHENA_EXPORT ActivityFactory { 26 class ATHENA_EXPORT ActivityFactory {
28 public: 27 public:
29 // Registers the singleton factory. 28 // Registers the singleton factory.
30 static void RegisterActivityFactory(ActivityFactory* factory); 29 static void RegisterActivityFactory(ActivityFactory* factory);
31 30
32 // Gets the registered singleton factory. 31 // Gets the registered singleton factory.
33 static ActivityFactory* Get(); 32 static ActivityFactory* Get();
34 33
35 // Shutdowns the factory. 34 // Shutdowns the factory.
36 static void Shutdown(); 35 static void Shutdown();
37 36
38 virtual ~ActivityFactory() {} 37 virtual ~ActivityFactory() {}
39 38
40 // Create an activity of a web page. If |title| is empty, the title will be 39 // Create an activity of a web page. If |title| is empty, the title will be
41 // obtained from the web contents. 40 // obtained from the web contents.
42 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context, 41 virtual Activity* CreateWebActivity(content::BrowserContext* browser_context,
43 const base::string16& title, 42 const base::string16& title,
44 const GURL& url) = 0; 43 const GURL& url) = 0;
45 44
46 // Create an activity of an app with |app_window| for app shell environemnt.
47 // The returned activity should own |app_window|.
48 // TODO(oshima): Consolidate these two methods to create AppActivity
49 // once crbug.com/403726 is finished.
50 virtual Activity* CreateAppActivity(extensions::ShellAppWindow* app_window,
51 const std::string& id) = 0;
52
53 // Create an activity of an app with |app_window| for chrome environment and 45 // Create an activity of an app with |app_window| for chrome environment and
54 // |web_view| that will host the content. 46 // |web_view| that will host the content.
55 virtual Activity* CreateAppActivity(extensions::AppWindow* app_window, 47 virtual Activity* CreateAppActivity(extensions::AppWindow* app_window,
56 views::WebView* web_view) = 0; 48 views::WebView* web_view) = 0;
57 }; 49 };
58 50
59 } // namespace athena 51 } // namespace athena
60 52
61 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_ 53 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | athena/content/chrome/content_activity_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698