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_AURA_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_AURA_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_AURA_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_AURA_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "extensions/shell/browser/desktop_controller.h" | 14 #include "extensions/shell/browser/desktop_controller.h" |
15 #include "ui/aura/client/window_tree_client.h" | 15 #include "ui/aura/client/window_parenting_client.h" |
16 #include "ui/aura/window_tree_host_observer.h" | 16 #include "ui/aura/window_tree_host_observer.h" |
17 | 17 |
18 #if defined(OS_CHROMEOS) | 18 #if defined(OS_CHROMEOS) |
19 #include "chromeos/dbus/power_manager_client.h" | 19 #include "chromeos/dbus/power_manager_client.h" |
20 #include "ui/display/chromeos/display_configurator.h" | 20 #include "ui/display/chromeos/display_configurator.h" |
21 #endif | 21 #endif |
22 | 22 |
23 namespace aura { | 23 namespace aura { |
24 class Window; | 24 class Window; |
25 class WindowTreeHost; | 25 class WindowTreeHost; |
(...skipping 24 matching lines...) Expand all Loading... |
50 } | 50 } |
51 | 51 |
52 namespace extensions { | 52 namespace extensions { |
53 class AppWindowClient; | 53 class AppWindowClient; |
54 class Extension; | 54 class Extension; |
55 class ShellScreen; | 55 class ShellScreen; |
56 | 56 |
57 // Handles desktop-related tasks for app_shell. | 57 // Handles desktop-related tasks for app_shell. |
58 class ShellDesktopControllerAura | 58 class ShellDesktopControllerAura |
59 : public DesktopController, | 59 : public DesktopController, |
60 public aura::client::WindowTreeClient, | 60 public aura::client::WindowParentingClient, |
61 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
62 public chromeos::PowerManagerClient::Observer, | 62 public chromeos::PowerManagerClient::Observer, |
63 public ui::DisplayConfigurator::Observer, | 63 public ui::DisplayConfigurator::Observer, |
64 #endif | 64 #endif |
65 public aura::WindowTreeHostObserver { | 65 public aura::WindowTreeHostObserver { |
66 public: | 66 public: |
67 ShellDesktopControllerAura(); | 67 ShellDesktopControllerAura(); |
68 ~ShellDesktopControllerAura() override; | 68 ~ShellDesktopControllerAura() override; |
69 | 69 |
70 // DesktopController: | 70 // DesktopController: |
71 gfx::Size GetWindowSize() override; | 71 gfx::Size GetWindowSize() override; |
72 AppWindow* CreateAppWindow(content::BrowserContext* context, | 72 AppWindow* CreateAppWindow(content::BrowserContext* context, |
73 const Extension* extension) override; | 73 const Extension* extension) override; |
74 void AddAppWindow(gfx::NativeWindow window) override; | 74 void AddAppWindow(gfx::NativeWindow window) override; |
75 void RemoveAppWindow(AppWindow* window) override; | 75 void RemoveAppWindow(AppWindow* window) override; |
76 void CloseAppWindows() override; | 76 void CloseAppWindows() override; |
77 | 77 |
78 // aura::client::WindowTreeClient overrides: | 78 // aura::client::WindowParentingClient overrides: |
79 aura::Window* GetDefaultParent(aura::Window* context, | 79 aura::Window* GetDefaultParent(aura::Window* context, |
80 aura::Window* window, | 80 aura::Window* window, |
81 const gfx::Rect& bounds) override; | 81 const gfx::Rect& bounds) override; |
82 | 82 |
83 #if defined(OS_CHROMEOS) | 83 #if defined(OS_CHROMEOS) |
84 // chromeos::PowerManagerClient::Observer overrides: | 84 // chromeos::PowerManagerClient::Observer overrides: |
85 void PowerButtonEventReceived(bool down, | 85 void PowerButtonEventReceived(bool down, |
86 const base::TimeTicks& timestamp) override; | 86 const base::TimeTicks& timestamp) override; |
87 | 87 |
88 // ui::DisplayConfigurator::Observer overrides. | 88 // ui::DisplayConfigurator::Observer overrides. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 // NativeAppWindow::Close() deletes the AppWindow. | 135 // NativeAppWindow::Close() deletes the AppWindow. |
136 std::vector<AppWindow*> app_windows_; | 136 std::vector<AppWindow*> app_windows_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(ShellDesktopControllerAura); | 138 DISALLOW_COPY_AND_ASSIGN(ShellDesktopControllerAura); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace extensions | 141 } // namespace extensions |
142 | 142 |
143 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_AURA_H_ | 143 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_AURA_H_ |
OLD | NEW |