| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Handles desktop-related tasks for app_shell. | 57 // Handles desktop-related tasks for app_shell. |
| 58 class ShellDesktopController : public DesktopController, | 58 class ShellDesktopController : public DesktopController, |
| 59 public aura::client::WindowTreeClient, | 59 public aura::client::WindowTreeClient, |
| 60 #if defined(OS_CHROMEOS) | 60 #if defined(OS_CHROMEOS) |
| 61 public chromeos::PowerManagerClient::Observer, | 61 public chromeos::PowerManagerClient::Observer, |
| 62 public ui::DisplayConfigurator::Observer, | 62 public ui::DisplayConfigurator::Observer, |
| 63 #endif | 63 #endif |
| 64 public aura::WindowTreeHostObserver { | 64 public aura::WindowTreeHostObserver { |
| 65 public: | 65 public: |
| 66 ShellDesktopController(); | 66 ShellDesktopController(); |
| 67 virtual ~ShellDesktopController(); | 67 ~ShellDesktopController() override; |
| 68 | 68 |
| 69 // DesktopController: | 69 // DesktopController: |
| 70 virtual aura::WindowTreeHost* GetHost() override; | 70 aura::WindowTreeHost* GetHost() override; |
| 71 virtual AppWindow* CreateAppWindow(content::BrowserContext* context, | 71 AppWindow* CreateAppWindow(content::BrowserContext* context, |
| 72 const Extension* extension) override; | 72 const Extension* extension) override; |
| 73 virtual void AddAppWindow(aura::Window* window) override; | 73 void AddAppWindow(aura::Window* window) override; |
| 74 virtual void RemoveAppWindow(AppWindow* window) override; | 74 void RemoveAppWindow(AppWindow* window) override; |
| 75 virtual void CloseAppWindows() override; | 75 void CloseAppWindows() override; |
| 76 | 76 |
| 77 // aura::client::WindowTreeClient overrides: | 77 // aura::client::WindowTreeClient overrides: |
| 78 virtual aura::Window* GetDefaultParent(aura::Window* context, | 78 aura::Window* GetDefaultParent(aura::Window* context, |
| 79 aura::Window* window, | 79 aura::Window* window, |
| 80 const gfx::Rect& bounds) override; | 80 const gfx::Rect& bounds) override; |
| 81 | 81 |
| 82 #if defined(OS_CHROMEOS) | 82 #if defined(OS_CHROMEOS) |
| 83 // chromeos::PowerManagerClient::Observer overrides: | 83 // chromeos::PowerManagerClient::Observer overrides: |
| 84 virtual void PowerButtonEventReceived(bool down, | 84 virtual void PowerButtonEventReceived(bool down, |
| 85 const base::TimeTicks& timestamp) | 85 const base::TimeTicks& timestamp) |
| 86 override; | 86 override; |
| 87 | 87 |
| 88 // ui::DisplayConfigurator::Observer overrides. | 88 // ui::DisplayConfigurator::Observer overrides. |
| 89 virtual void OnDisplayModeChanged(const std::vector< | 89 virtual void OnDisplayModeChanged(const std::vector< |
| 90 ui::DisplayConfigurator::DisplayState>& displays) override; | 90 ui::DisplayConfigurator::DisplayState>& displays) override; |
| 91 #endif | 91 #endif |
| 92 | 92 |
| 93 // aura::WindowTreeHostObserver overrides: | 93 // aura::WindowTreeHostObserver overrides: |
| 94 virtual void OnHostCloseRequested(const aura::WindowTreeHost* host) override; | 94 void OnHostCloseRequested(const aura::WindowTreeHost* host) override; |
| 95 | 95 |
| 96 protected: | 96 protected: |
| 97 // Creates and sets the aura clients and window manager stuff. Subclass may | 97 // Creates and sets the aura clients and window manager stuff. Subclass may |
| 98 // initialize different sets of the clients. | 98 // initialize different sets of the clients. |
| 99 virtual void InitWindowManager(); | 99 virtual void InitWindowManager(); |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 // Creates the window that hosts the app. | 102 // Creates the window that hosts the app. |
| 103 void CreateRootWindow(); | 103 void CreateRootWindow(); |
| 104 | 104 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 // NativeAppWindow::Close() deletes the AppWindow. | 137 // NativeAppWindow::Close() deletes the AppWindow. |
| 138 std::vector<AppWindow*> app_windows_; | 138 std::vector<AppWindow*> app_windows_; |
| 139 | 139 |
| 140 DISALLOW_COPY_AND_ASSIGN(ShellDesktopController); | 140 DISALLOW_COPY_AND_ASSIGN(ShellDesktopController); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace extensions | 143 } // namespace extensions |
| 144 | 144 |
| 145 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ | 145 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_DESKTOP_CONTROLLER_H_ |
| OLD | NEW |