Chromium Code Reviews| 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 class Extension; | |
| 18 class ShellAppWindow; | |
| 19 | |
| 20 class DesktopController { | |
|
James Cook
2014/08/25 16:56:14
nit: Please comment on the purpose of this class.
oshima
2014/08/25 17:29:32
Done.
| |
| 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; | |
|
James Cook
2014/08/25 16:56:14
nit: function comment
(I know it seems stupid, bu
oshima
2014/08/25 17:29:32
I'm fine. Different people have different preferen
| |
| 31 | |
| 32 // Creates a new app window and adds it to the desktop. The desktop maintains | |
| 33 // ownership of the window. The window must be closed before |extension| is | |
| 34 // destroyed. | |
| 35 virtual ShellAppWindow* CreateAppWindow(content::BrowserContext* context, | |
| 36 const Extension* extension) = 0; | |
| 37 | |
| 38 // Closes and destroys the app windows. | |
| 39 virtual void CloseAppWindows() = 0; | |
| 40 }; | |
| 41 | |
| 42 } // namespace extensinos | |
| 43 | |
| 44 #endif // EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ | |
|
James Cook
2014/08/25 16:56:14
nit: one space after //
oshima
2014/08/25 17:29:32
Done.
| |
| OLD | NEW |