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_SHELL_DESKTOP_CONTROLLER_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 namespace wm { | 43 namespace wm { |
44 class CompoundEventFilter; | 44 class CompoundEventFilter; |
45 class CursorManager; | 45 class CursorManager; |
46 class FocusRules; | 46 class FocusRules; |
47 class InputMethodEventFilter; | 47 class InputMethodEventFilter; |
48 class UserActivityDetector; | 48 class UserActivityDetector; |
49 } | 49 } |
50 | 50 |
51 namespace extensions { | 51 namespace extensions { |
52 | 52 |
| 53 class Extension; |
53 class ShellAppWindow; | 54 class ShellAppWindow; |
54 class ShellAppWindowController; | 55 class ShellAppWindowController; |
55 | 56 |
56 // Handles desktop-related tasks for app_shell. | 57 // Handles desktop-related tasks for app_shell. |
57 class ShellDesktopController : public aura::client::WindowTreeClient, | 58 class ShellDesktopController : public aura::client::WindowTreeClient, |
58 public aura::WindowTreeHostObserver | 59 public aura::WindowTreeHostObserver |
59 #if defined(OS_CHROMEOS) | 60 #if defined(OS_CHROMEOS) |
60 , | 61 , |
61 public ui::DisplayConfigurator::Observer | 62 public ui::DisplayConfigurator::Observer |
62 #endif | 63 #endif |
(...skipping 10 matching lines...) Expand all Loading... |
73 aura::WindowTreeHost* host() { return host_.get(); } | 74 aura::WindowTreeHost* host() { return host_.get(); } |
74 | 75 |
75 // Creates the window that hosts the app. | 76 // Creates the window that hosts the app. |
76 void CreateRootWindow(); | 77 void CreateRootWindow(); |
77 | 78 |
78 // Sets the controller to create/close the app windows. Takes the ownership of | 79 // Sets the controller to create/close the app windows. Takes the ownership of |
79 // |app_window_controller|. | 80 // |app_window_controller|. |
80 void SetAppWindowController(ShellAppWindowController* app_window_controller); | 81 void SetAppWindowController(ShellAppWindowController* app_window_controller); |
81 | 82 |
82 // Creates a new app window and adds it to the desktop. The desktop maintains | 83 // Creates a new app window and adds it to the desktop. The desktop maintains |
83 // ownership of the window. | 84 // ownership of the window. The window must be closed before |extension| is |
84 ShellAppWindow* CreateAppWindow(content::BrowserContext* context); | 85 // destroyed. |
| 86 ShellAppWindow* CreateAppWindow(content::BrowserContext* context, |
| 87 const Extension* extension); |
85 | 88 |
86 // Closes and destroys the app windows. | 89 // Closes and destroys the app windows. |
87 void CloseAppWindows(); | 90 void CloseAppWindows(); |
88 | 91 |
89 // Sets the screen's work area insets. | 92 // Sets the screen's work area insets. |
90 void SetDisplayWorkAreaInsets(const gfx::Insets& insets); | 93 void SetDisplayWorkAreaInsets(const gfx::Insets& insets); |
91 | 94 |
92 // Overridden from aura::client::WindowTreeClient: | 95 // Overridden from aura::client::WindowTreeClient: |
93 virtual aura::Window* GetDefaultParent(aura::Window* context, | 96 virtual aura::Window* GetDefaultParent(aura::Window* context, |
94 aura::Window* window, | 97 aura::Window* window, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 147 |
145 // The desktop supports a single app window. | 148 // The desktop supports a single app window. |
146 scoped_ptr<ShellAppWindowController> app_window_controller_; | 149 scoped_ptr<ShellAppWindowController> app_window_controller_; |
147 | 150 |
148 DISALLOW_COPY_AND_ASSIGN(ShellDesktopController); | 151 DISALLOW_COPY_AND_ASSIGN(ShellDesktopController); |
149 }; | 152 }; |
150 | 153 |
151 } // namespace extensions | 154 } // namespace extensions |
152 | 155 |
153 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ | 156 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ |
OLD | NEW |