OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 APPS_APPS_CLIENT_H_ | 5 #ifndef APPS_APPS_CLIENT_H_ |
6 #define APPS_APPS_CLIENT_H_ | 6 #define APPS_APPS_CLIENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 19 matching lines...) Expand all Loading... |
30 // or false if the launch should be prevented. | 30 // or false if the launch should be prevented. |
31 virtual bool CheckAppLaunch(content::BrowserContext* context, | 31 virtual bool CheckAppLaunch(content::BrowserContext* context, |
32 const extensions::Extension* extension) = 0; | 32 const extensions::Extension* extension) = 0; |
33 | 33 |
34 // Creates a new apps::AppWindow for the app in |extension| for |context|. | 34 // Creates a new apps::AppWindow for the app in |extension| for |context|. |
35 // Caller takes ownership. | 35 // Caller takes ownership. |
36 virtual AppWindow* CreateAppWindow( | 36 virtual AppWindow* CreateAppWindow( |
37 content::BrowserContext* context, | 37 content::BrowserContext* context, |
38 const extensions::Extension* extension) = 0; | 38 const extensions::Extension* extension) = 0; |
39 | 39 |
40 // Tells the embedding application to stay running. The application may close | 40 // A positive keep-alive count is a request for the embedding application to |
41 // after a matching number of calls to EndKeepAlive() are made. | 41 // keep running after all windows are closed. The count starts at zero. |
42 virtual void StartKeepAlive() = 0; | 42 virtual void IncrementKeepAliveCount() = 0; |
43 virtual void EndKeepAlive() = 0; | 43 virtual void DecrementKeepAliveCount() = 0; |
44 | 44 |
45 // Return the apps client. | 45 // Return the apps client. |
46 static AppsClient* Get(); | 46 static AppsClient* Get(); |
47 | 47 |
48 // Initialize the apps system with this apps client. | 48 // Initialize the apps system with this apps client. |
49 static void Set(AppsClient* client); | 49 static void Set(AppsClient* client); |
50 }; | 50 }; |
51 | 51 |
52 } // namespace apps | 52 } // namespace apps |
53 | 53 |
54 #endif // APPS_APPS_CLIENT_H_ | 54 #endif // APPS_APPS_CLIENT_H_ |
OLD | NEW |