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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 namespace wm { | 44 namespace wm { |
45 class CompoundEventFilter; | 45 class CompoundEventFilter; |
46 class CursorManager; | 46 class CursorManager; |
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 Extension; |
54 class ShellAppWindow; | |
55 | 54 |
56 // Handles desktop-related tasks for app_shell. | 55 // Handles desktop-related tasks for app_shell. |
57 class ShellDesktopController : public DesktopController, | 56 class ShellDesktopController : public DesktopController, |
58 public aura::client::WindowTreeClient, | 57 public aura::client::WindowTreeClient, |
59 #if defined(OS_CHROMEOS) | 58 #if defined(OS_CHROMEOS) |
60 public chromeos::PowerManagerClient::Observer, | 59 public chromeos::PowerManagerClient::Observer, |
61 public ui::DisplayConfigurator::Observer, | 60 public ui::DisplayConfigurator::Observer, |
62 #endif | 61 #endif |
63 public aura::WindowTreeHostObserver { | 62 public aura::WindowTreeHostObserver { |
64 public: | 63 public: |
65 ShellDesktopController(); | 64 ShellDesktopController(); |
66 virtual ~ShellDesktopController(); | 65 virtual ~ShellDesktopController(); |
67 | 66 |
68 // DesktopController: | 67 // DesktopController: |
69 virtual aura::WindowTreeHost* GetHost() OVERRIDE; | 68 virtual aura::WindowTreeHost* GetHost() OVERRIDE; |
70 virtual ShellAppWindow* CreateShellAppWindow( | |
71 content::BrowserContext* context, | |
72 const Extension* extension) OVERRIDE; | |
73 virtual AppWindow* CreateAppWindow(content::BrowserContext* context, | 69 virtual AppWindow* CreateAppWindow(content::BrowserContext* context, |
74 const Extension* extension) OVERRIDE; | 70 const Extension* extension) OVERRIDE; |
75 virtual void AddAppWindow(aura::Window* window) OVERRIDE; | 71 virtual void AddAppWindow(aura::Window* window) OVERRIDE; |
76 virtual void CloseAppWindows() OVERRIDE; | 72 virtual void CloseAppWindows() OVERRIDE; |
77 | 73 |
78 // aura::client::WindowTreeClient overrides: | 74 // aura::client::WindowTreeClient overrides: |
79 virtual aura::Window* GetDefaultParent(aura::Window* context, | 75 virtual aura::Window* GetDefaultParent(aura::Window* context, |
80 aura::Window* window, | 76 aura::Window* window, |
81 const gfx::Rect& bounds) OVERRIDE; | 77 const gfx::Rect& bounds) OVERRIDE; |
82 | 78 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 scoped_ptr<aura::client::FocusClient> focus_client_; | 123 scoped_ptr<aura::client::FocusClient> focus_client_; |
128 | 124 |
129 scoped_ptr<wm::CursorManager> cursor_manager_; | 125 scoped_ptr<wm::CursorManager> cursor_manager_; |
130 | 126 |
131 scoped_ptr<wm::UserActivityDetector> user_activity_detector_; | 127 scoped_ptr<wm::UserActivityDetector> user_activity_detector_; |
132 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
133 scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_; | 129 scoped_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_; |
134 #endif | 130 #endif |
135 | 131 |
136 // The desktop supports a single app window. | 132 // The desktop supports a single app window. |
137 scoped_ptr<ShellAppWindow> shell_app_window_; | |
138 AppWindow* app_window_; // NativeAppWindow::Close() deletes this. | 133 AppWindow* app_window_; // NativeAppWindow::Close() deletes this. |
139 | 134 |
140 DISALLOW_COPY_AND_ASSIGN(ShellDesktopController); | 135 DISALLOW_COPY_AND_ASSIGN(ShellDesktopController); |
141 }; | 136 }; |
142 | 137 |
143 } // namespace extensions | 138 } // namespace extensions |
144 | 139 |
145 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ | 140 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ |
OLD | NEW |