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

Side by Side Diff: apps/apps_client.h

Issue 436503002: Moved CreateNativeAppWindow from AppWindow::Delegate to AppsClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « apps/apps.gypi ('k') | apps/apps_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef APPS_APPS_CLIENT_H_
6 #define APPS_APPS_CLIENT_H_
7
8 #include <vector>
9
10 namespace content {
11 class BrowserContext;
12 }
13
14 namespace extensions {
15 class Extension;
16 }
17
18 namespace apps {
19
20 class AppWindow;
21
22 // Sets up global state for the apps system. Should be Set() once in each
23 // process. This should be implemented by the client of the apps system.
24 class AppsClient {
25 public:
26 // Get all loaded browser contexts.
27 virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts() = 0;
28
29 // Creates a new apps::AppWindow for the app in |extension| for |context|.
30 // Caller takes ownership.
31 virtual AppWindow* CreateAppWindow(
32 content::BrowserContext* context,
33 const extensions::Extension* extension) = 0;
34
35 // A positive keep-alive count is a request for the embedding application to
36 // keep running after all windows are closed. The count starts at zero.
37 virtual void IncrementKeepAliveCount() = 0;
38 virtual void DecrementKeepAliveCount() = 0;
39
40 // Return the apps client.
41 static AppsClient* Get();
42
43 // Initialize the apps system with this apps client.
44 static void Set(AppsClient* client);
45 };
46
47 } // namespace apps
48
49 #endif // APPS_APPS_CLIENT_H_
OLDNEW
« no previous file with comments | « apps/apps.gypi ('k') | apps/apps_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698