OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ |
| 6 #define EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ |
| 7 |
| 8 namespace aura { |
| 9 class WindowTreeHost; |
| 10 } |
| 11 |
| 12 namespace content { |
| 13 class BrowserContext; |
| 14 } |
| 15 |
| 16 namespace extensions { |
| 17 |
| 18 class ShellAppWindow; |
| 19 |
| 20 class DesktopController { |
| 21 public: |
| 22 DesktopController(); |
| 23 virtual ~DesktopController(); |
| 24 |
| 25 // Returns the single instance of the desktop. (Stateless functions like |
| 26 // ShellAppWindowCreateFunction need to be able to access the desktop, so |
| 27 // we need a singleton somewhere). |
| 28 static DesktopController* instance(); |
| 29 |
| 30 virtual aura::WindowTreeHost* GetHost() = 0; |
| 31 |
| 32 // Creates the window that hosts the app. |
| 33 virtual void CreateRootWindow() = 0; |
| 34 |
| 35 // Creates a new app window and adds it to the desktop. The desktop maintains |
| 36 // ownership of the window. |
| 37 virtual ShellAppWindow* CreateAppWindow(content::BrowserContext* context) = 0; |
| 38 |
| 39 // Closes and destroys the app windows. |
| 40 virtual void CloseAppWindows() = 0; |
| 41 }; |
| 42 |
| 43 } // namespace extensinos |
| 44 |
| 45 #endif // EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ |
OLD | NEW |