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_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ |
7 | 7 |
8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 | 9 |
10 namespace aura { | 10 namespace aura { |
11 class Window; | 11 class Window; |
12 class WindowTreeHost; | 12 class WindowTreeHost; |
13 } | 13 } |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class BrowserContext; | 16 class BrowserContext; |
17 } | 17 } |
18 | 18 |
19 namespace gfx { | 19 namespace gfx { |
20 class Size; | 20 class Size; |
21 } | 21 } |
22 | 22 |
23 namespace extensions { | 23 namespace extensions { |
24 class AppWindow; | 24 class AppWindow; |
25 class Extension; | 25 class Extension; |
26 class ShellAppWindow; | 26 class ShellAppWindow; |
27 | 27 |
28 // DesktopController is an interface to construct the window environment in | 28 // DesktopController is an interface to construct the window environment in |
29 // extensions shell. ShellDesktopControllerAura provides a default | 29 // extensions shell. ShellDesktopControllerAura provides a default |
30 // implementation for app_shell, and other embedders (such as athena) can | 30 // implementation for app_shell, and other embedders can provide their own. |
31 // provide their own. | |
32 // TODO(jamescook|oshima): Clean up this interface now that there is only one | 31 // TODO(jamescook|oshima): Clean up this interface now that there is only one |
33 // way to create an app window. | 32 // way to create an app window. |
34 class DesktopController { | 33 class DesktopController { |
35 public: | 34 public: |
36 DesktopController(); | 35 DesktopController(); |
37 virtual ~DesktopController(); | 36 virtual ~DesktopController(); |
38 | 37 |
39 // Returns the single instance of the desktop. (Stateless functions like | 38 // Returns the single instance of the desktop. (Stateless functions like |
40 // ShellAppWindowCreateFunction need to be able to access the desktop, so | 39 // ShellAppWindowCreateFunction need to be able to access the desktop, so |
41 // we need a singleton somewhere). | 40 // we need a singleton somewhere). |
(...skipping 15 matching lines...) Expand all Loading... |
57 // Removes the window from the desktop. | 56 // Removes the window from the desktop. |
58 virtual void RemoveAppWindow(AppWindow* window) = 0; | 57 virtual void RemoveAppWindow(AppWindow* window) = 0; |
59 | 58 |
60 // Closes and destroys the app windows. | 59 // Closes and destroys the app windows. |
61 virtual void CloseAppWindows() = 0; | 60 virtual void CloseAppWindows() = 0; |
62 }; | 61 }; |
63 | 62 |
64 } // namespace extensions | 63 } // namespace extensions |
65 | 64 |
66 #endif // EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ | 65 #endif // EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ |
OLD | NEW |