Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: extensions/shell/browser/desktop_controller.h

Issue 480353006: Separate athena's startup process from AppShell's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 // DesktopController is an interface to construct the window environment in
21 // extensions shell. ShellDesktopController provides a default implementation fo r
James Cook 2014/08/25 17:35:45 nit: line length? codereview is wrapping the line
oshima 2014/08/25 19:06:53 Done.
22 // app_shell, and embedder (such as athena) can provide its own.
23 class DesktopController {
24 public:
25 DesktopController();
26 virtual ~DesktopController();
27
28 // Returns the single instance of the desktop. (Stateless functions like
29 // ShellAppWindowCreateFunction need to be able to access the desktop, so
30 // we need a singleton somewhere).
31 static DesktopController* instance();
32
33 // Returns the WindowTreeHost created by this DesktopController.
34 virtual aura::WindowTreeHost* GetHost() = 0;
35
36 // Creates a new app window and adds it to the desktop. The desktop maintains
37 // ownership of the window. The window must be closed before |extension| is
38 // destroyed.
39 virtual ShellAppWindow* CreateAppWindow(content::BrowserContext* context,
40 const Extension* extension) = 0;
41
42 // Closes and destroys the app windows.
43 virtual void CloseAppWindows() = 0;
44 };
45
46 } // namespace extensinos
47
48 #endif // EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « extensions/shell/browser/default_shell_browser_main_delegate.cc ('k') | extensions/shell/browser/desktop_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698