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_WIN_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ |
7 | 7 |
8 #include "ui/aura/client/animation_host.h" | 8 #include "ui/aura/client/animation_host.h" |
9 #include "ui/aura/window_tree_host.h" | 9 #include "ui/aura/window_tree_host.h" |
10 #include "ui/views/views_export.h" | 10 #include "ui/views/views_export.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace views { | 22 namespace views { |
23 class DesktopCursorClient; | 23 class DesktopCursorClient; |
24 class DesktopDragDropClientWin; | 24 class DesktopDragDropClientWin; |
25 class HWNDMessageHandler; | 25 class HWNDMessageHandler; |
26 | 26 |
27 namespace corewm { | 27 namespace corewm { |
28 class TooltipWin; | 28 class TooltipWin; |
29 } | 29 } |
30 | 30 |
31 class VIEWS_EXPORT DesktopRootWindowHostWin | 31 class VIEWS_EXPORT DesktopWindowTreeHostWin |
32 : public DesktopRootWindowHost, | 32 : public DesktopWindowTreeHost, |
33 public aura::client::AnimationHost, | 33 public aura::client::AnimationHost, |
34 public aura::RootWindowHost, | 34 public aura::WindowTreeHost, |
35 public HWNDMessageHandlerDelegate { | 35 public HWNDMessageHandlerDelegate { |
36 public: | 36 public: |
37 DesktopRootWindowHostWin( | 37 DesktopWindowTreeHostWin( |
38 internal::NativeWidgetDelegate* native_widget_delegate, | 38 internal::NativeWidgetDelegate* native_widget_delegate, |
39 DesktopNativeWidgetAura* desktop_native_widget_aura); | 39 DesktopNativeWidgetAura* desktop_native_widget_aura); |
40 virtual ~DesktopRootWindowHostWin(); | 40 virtual ~DesktopWindowTreeHostWin(); |
41 | 41 |
42 // A way of converting an HWND into a content window. | 42 // A way of converting an HWND into a content window. |
43 static aura::Window* GetContentWindowForHWND(HWND hwnd); | 43 static aura::Window* GetContentWindowForHWND(HWND hwnd); |
44 | 44 |
45 protected: | 45 protected: |
46 // Overridden from DesktopRootWindowHost: | 46 // Overridden from DesktopWindowTreeHost: |
47 virtual void Init(aura::Window* content_window, | 47 virtual void Init(aura::Window* content_window, |
48 const Widget::InitParams& params, | 48 const Widget::InitParams& params, |
49 aura::RootWindow::CreateParams* rw_create_params) OVERRIDE; | 49 aura::RootWindow::CreateParams* rw_create_params) OVERRIDE; |
50 virtual void OnRootWindowCreated(aura::RootWindow* root, | 50 virtual void OnRootWindowCreated(aura::RootWindow* root, |
51 const Widget::InitParams& params) OVERRIDE; | 51 const Widget::InitParams& params) OVERRIDE; |
52 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() OVERRIDE; | 52 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() OVERRIDE; |
53 virtual scoped_ptr<aura::client::DragDropClient> | 53 virtual scoped_ptr<aura::client::DragDropClient> |
54 CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE; | 54 CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) OVERRIDE; |
55 virtual void Close() OVERRIDE; | 55 virtual void Close() OVERRIDE; |
56 virtual void CloseNow() OVERRIDE; | 56 virtual void CloseNow() OVERRIDE; |
57 virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE; | 57 virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE; |
58 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE; | 58 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE; |
59 virtual void ShowMaximizedWithBounds( | 59 virtual void ShowMaximizedWithBounds( |
60 const gfx::Rect& restored_bounds) OVERRIDE; | 60 const gfx::Rect& restored_bounds) OVERRIDE; |
61 virtual bool IsVisible() const OVERRIDE; | 61 virtual bool IsVisible() const OVERRIDE; |
62 virtual void SetSize(const gfx::Size& size) OVERRIDE; | 62 virtual void SetSize(const gfx::Size& size) OVERRIDE; |
63 virtual void StackAtTop() OVERRIDE; | 63 virtual void StackAtTop() OVERRIDE; |
64 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; | 64 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; |
65 virtual void GetWindowPlacement( | 65 virtual void GetWindowPlacement( |
66 gfx::Rect* bounds, | 66 gfx::Rect* bounds, |
67 ui::WindowShowState* show_state) const OVERRIDE; | 67 ui::WindowShowState* show_state) const OVERRIDE; |
(...skipping 29 matching lines...) Expand all Loading... |
97 virtual void SetOpacity(unsigned char opacity) OVERRIDE; | 97 virtual void SetOpacity(unsigned char opacity) OVERRIDE; |
98 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, | 98 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, |
99 const gfx::ImageSkia& app_icon) OVERRIDE; | 99 const gfx::ImageSkia& app_icon) OVERRIDE; |
100 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE; | 100 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE; |
101 virtual void FlashFrame(bool flash_frame) OVERRIDE; | 101 virtual void FlashFrame(bool flash_frame) OVERRIDE; |
102 virtual void OnRootViewLayout() const OVERRIDE; | 102 virtual void OnRootViewLayout() const OVERRIDE; |
103 virtual void OnNativeWidgetFocus() OVERRIDE; | 103 virtual void OnNativeWidgetFocus() OVERRIDE; |
104 virtual void OnNativeWidgetBlur() OVERRIDE; | 104 virtual void OnNativeWidgetBlur() OVERRIDE; |
105 virtual bool IsAnimatingClosed() const OVERRIDE; | 105 virtual bool IsAnimatingClosed() const OVERRIDE; |
106 | 106 |
107 // Overridden from aura::RootWindowHost: | 107 // Overridden from aura::WindowTreeHost: |
108 virtual aura::RootWindow* GetRootWindow() OVERRIDE; | 108 virtual aura::RootWindow* GetRootWindow() OVERRIDE; |
109 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 109 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
110 virtual void Show() OVERRIDE; | 110 virtual void Show() OVERRIDE; |
111 virtual void Hide() OVERRIDE; | 111 virtual void Hide() OVERRIDE; |
112 virtual void ToggleFullScreen() OVERRIDE; | 112 virtual void ToggleFullScreen() OVERRIDE; |
113 virtual gfx::Rect GetBounds() const OVERRIDE; | 113 virtual gfx::Rect GetBounds() const OVERRIDE; |
114 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 114 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
115 virtual gfx::Insets GetInsets() const OVERRIDE; | 115 virtual gfx::Insets GetInsets() const OVERRIDE; |
116 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; | 116 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; |
117 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 117 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 // Owned by TooltipController, but we need to forward events to it so we keep | 267 // Owned by TooltipController, but we need to forward events to it so we keep |
268 // a reference. | 268 // a reference. |
269 corewm::TooltipWin* tooltip_; | 269 corewm::TooltipWin* tooltip_; |
270 | 270 |
271 // State of the cursor. | 271 // State of the cursor. |
272 bool is_cursor_visible_; | 272 bool is_cursor_visible_; |
273 | 273 |
274 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; | 274 scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; |
275 | 275 |
276 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin); | 276 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWin); |
277 }; | 277 }; |
278 | 278 |
279 } // namespace views | 279 } // namespace views |
280 | 280 |
281 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ | 281 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ |
OLD | NEW |