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 EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ |
6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 // Creates a new AppWindow for the app in |extension| for |context|. | 33 // Creates a new AppWindow for the app in |extension| for |context|. |
34 // Caller takes ownership. | 34 // Caller takes ownership. |
35 virtual AppWindow* CreateAppWindow(content::BrowserContext* context, | 35 virtual AppWindow* CreateAppWindow(content::BrowserContext* context, |
36 const Extension* extension) = 0; | 36 const Extension* extension) = 0; |
37 | 37 |
38 // Creates a new extensions::NativeAppWindow for |window|. | 38 // Creates a new extensions::NativeAppWindow for |window|. |
39 virtual NativeAppWindow* CreateNativeAppWindow( | 39 virtual NativeAppWindow* CreateNativeAppWindow( |
40 AppWindow* window, | 40 AppWindow* window, |
41 const AppWindow::CreateParams& params) = 0; | 41 const AppWindow::CreateParams& params) = 0; |
42 | 42 |
43 // A positive keep-alive count is a request for the embedding application to | |
44 // keep running after all windows are closed. The count starts at zero. | |
45 virtual void IncrementKeepAliveCount() = 0; | |
46 virtual void DecrementKeepAliveCount() = 0; | |
47 | |
48 // Opens DevTools window and runs the callback. | 43 // Opens DevTools window and runs the callback. |
49 virtual void OpenDevToolsWindow(content::WebContents* web_contents, | 44 virtual void OpenDevToolsWindow(content::WebContents* web_contents, |
50 const base::Closure& callback) = 0; | 45 const base::Closure& callback) = 0; |
51 | 46 |
52 // Returns true if the current channel is older than dev. | 47 // Returns true if the current channel is older than dev. |
53 virtual bool IsCurrentChannelOlderThanDev() = 0; | 48 virtual bool IsCurrentChannelOlderThanDev() = 0; |
54 | 49 |
55 // Return the app window client. | 50 // Return the app window client. |
56 static AppWindowClient* Get(); | 51 static AppWindowClient* Get(); |
57 | 52 |
58 // Initialize the app window system with this app window client. | 53 // Initialize the app window system with this app window client. |
59 static void Set(AppWindowClient* client); | 54 static void Set(AppWindowClient* client); |
60 }; | 55 }; |
61 | 56 |
62 } // namespace extensions | 57 } // namespace extensions |
63 | 58 |
64 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ | 59 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_CLIENT_H_ |
OLD | NEW |