| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
| 10 #include "ui/base/ui_base_types.h" | 10 #include "ui/base/ui_base_types.h" |
| 11 #include "ui/views/views_export.h" | 11 #include "ui/views/views_export.h" |
| 12 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
| 13 | 13 |
| 14 namespace aura { | 14 namespace aura { |
| 15 class WindowTreeHost; | 15 class RootWindowHost; |
| 16 class Window; | 16 class Window; |
| 17 | 17 |
| 18 namespace client { | 18 namespace client { |
| 19 class DragDropClient; | 19 class DragDropClient; |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace gfx { | 23 namespace gfx { |
| 24 class ImageSkia; | 24 class ImageSkia; |
| 25 class Rect; | 25 class Rect; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace ui { | 28 namespace ui { |
| 29 class NativeTheme; | 29 class NativeTheme; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace views { | 32 namespace views { |
| 33 namespace corewm { | 33 namespace corewm { |
| 34 | 34 |
| 35 class Tooltip; | 35 class Tooltip; |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace internal { | 38 namespace internal { |
| 39 class NativeWidgetDelegate; | 39 class NativeWidgetDelegate; |
| 40 } | 40 } |
| 41 | 41 |
| 42 class DesktopNativeCursorManager; | 42 class DesktopNativeCursorManager; |
| 43 class DesktopNativeWidgetAura; | 43 class DesktopNativeWidgetAura; |
| 44 | 44 |
| 45 class VIEWS_EXPORT DesktopWindowTreeHost { | 45 class VIEWS_EXPORT DesktopRootWindowHost { |
| 46 public: | 46 public: |
| 47 virtual ~DesktopWindowTreeHost() {} | 47 virtual ~DesktopRootWindowHost() {} |
| 48 | 48 |
| 49 static DesktopWindowTreeHost* Create( | 49 static DesktopRootWindowHost* Create( |
| 50 internal::NativeWidgetDelegate* native_widget_delegate, | 50 internal::NativeWidgetDelegate* native_widget_delegate, |
| 51 DesktopNativeWidgetAura* desktop_native_widget_aura); | 51 DesktopNativeWidgetAura* desktop_native_widget_aura); |
| 52 | 52 |
| 53 // Return the NativeTheme to use for |window|. WARNING: |window| may be NULL. | 53 // Return the NativeTheme to use for |window|. WARNING: |window| may be NULL. |
| 54 static ui::NativeTheme* GetNativeTheme(aura::Window* window); | 54 static ui::NativeTheme* GetNativeTheme(aura::Window* window); |
| 55 | 55 |
| 56 // Sets up resources needed before the RootWindow has been created. | 56 // Sets up resources needed before the RootWindow has been created. |
| 57 virtual void Init(aura::Window* content_window, | 57 virtual void Init(aura::Window* content_window, |
| 58 const Widget::InitParams& params, | 58 const Widget::InitParams& params, |
| 59 aura::RootWindow::CreateParams* rw_create_params) = 0; | 59 aura::RootWindow::CreateParams* rw_create_params) = 0; |
| 60 | 60 |
| 61 // Invoked once the RootWindow has been created. Caller owns the RootWindow. | 61 // Invoked once the RootWindow has been created. Caller owns the RootWindow. |
| 62 virtual void OnRootWindowCreated(aura::RootWindow* root, | 62 virtual void OnRootWindowCreated(aura::RootWindow* root, |
| 63 const Widget::InitParams& params) = 0; | 63 const Widget::InitParams& params) = 0; |
| 64 | 64 |
| 65 // Creates and returns the Tooltip implementation to use. Return value is | 65 // Creates and returns the Tooltip implementation to use. Return value is |
| 66 // owned by DesktopNativeWidgetAura and lives as long as | 66 // owned by DesktopNativeWidgetAura and lives as long as |
| 67 // DesktopWindowTreeHost. | 67 // DesktopRootWindowHost. |
| 68 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() = 0; | 68 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() = 0; |
| 69 | 69 |
| 70 // Creates and returns the DragDropClient implementation to use. Return value | 70 // Creates and returns the DragDropClient implementation to use. Return value |
| 71 // is owned by DesktopNativeWidgetAura and lives as long as | 71 // is owned by DesktopNativeWidgetAura and lives as long as |
| 72 // DesktopWindowTreeHost. | 72 // DesktopRootWindowHost. |
| 73 virtual scoped_ptr<aura::client::DragDropClient> CreateDragDropClient( | 73 virtual scoped_ptr<aura::client::DragDropClient> CreateDragDropClient( |
| 74 DesktopNativeCursorManager* cursor_manager) = 0; | 74 DesktopNativeCursorManager* cursor_manager) = 0; |
| 75 | 75 |
| 76 virtual void Close() = 0; | 76 virtual void Close() = 0; |
| 77 virtual void CloseNow() = 0; | 77 virtual void CloseNow() = 0; |
| 78 | 78 |
| 79 virtual aura::WindowTreeHost* AsWindowTreeHost() = 0; | 79 virtual aura::RootWindowHost* AsRootWindowHost() = 0; |
| 80 | 80 |
| 81 virtual void ShowWindowWithState(ui::WindowShowState show_state) = 0; | 81 virtual void ShowWindowWithState(ui::WindowShowState show_state) = 0; |
| 82 virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0; | 82 virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0; |
| 83 | 83 |
| 84 virtual bool IsVisible() const = 0; | 84 virtual bool IsVisible() const = 0; |
| 85 | 85 |
| 86 virtual void SetSize(const gfx::Size& size) = 0; | 86 virtual void SetSize(const gfx::Size& size) = 0; |
| 87 virtual void CenterWindow(const gfx::Size& size) = 0; | 87 virtual void CenterWindow(const gfx::Size& size) = 0; |
| 88 virtual void GetWindowPlacement(gfx::Rect* bounds, | 88 virtual void GetWindowPlacement(gfx::Rect* bounds, |
| 89 ui::WindowShowState* show_state) const = 0; | 89 ui::WindowShowState* show_state) const = 0; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 virtual void OnNativeWidgetBlur() = 0; | 147 virtual void OnNativeWidgetBlur() = 0; |
| 148 | 148 |
| 149 // Returns true if the Widget was closed but is still showing because of | 149 // Returns true if the Widget was closed but is still showing because of |
| 150 // animations. | 150 // animations. |
| 151 virtual bool IsAnimatingClosed() const = 0; | 151 virtual bool IsAnimatingClosed() const = 0; |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace views | 154 } // namespace views |
| 155 | 155 |
| 156 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ | 156 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_H_ |
| OLD | NEW |