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_ROOT_WINDOW_HOST_WIN_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ |
7 | 7 |
8 #include "ui/aura/root_window_host.h" | 8 #include "ui/aura/root_window_host.h" |
9 #include "ui/views/widget/desktop_root_window_host.h" | 9 #include "ui/views/widget/desktop_root_window_host.h" |
10 #include "ui/views/win/hwnd_message_handler_delegate.h" | 10 #include "ui/views/win/hwnd_message_handler_delegate.h" |
11 | 11 |
| 12 namespace aura { |
| 13 class DesktopActivationClient; |
| 14 class DesktopDispatcherClient; |
| 15 class FocusManager; |
| 16 } |
| 17 |
12 namespace views { | 18 namespace views { |
| 19 class DesktopCaptureClient; |
13 class HWNDMessageHandler; | 20 class HWNDMessageHandler; |
14 | 21 |
15 class DesktopRootWindowHostWin : public DesktopRootWindowHost, | 22 class DesktopRootWindowHostWin : public DesktopRootWindowHost, |
16 public aura::RootWindowHost, | 23 public aura::RootWindowHost, |
17 public HWNDMessageHandlerDelegate { | 24 public HWNDMessageHandlerDelegate { |
18 public: | 25 public: |
19 DesktopRootWindowHostWin( | 26 DesktopRootWindowHostWin( |
20 internal::NativeWidgetDelegate* native_widget_delegate, | 27 internal::NativeWidgetDelegate* native_widget_delegate, |
21 const gfx::Rect& initial_bounds); | 28 const gfx::Rect& initial_bounds); |
22 virtual ~DesktopRootWindowHostWin(); | 29 virtual ~DesktopRootWindowHostWin(); |
23 | 30 |
24 private: | 31 private: |
25 // Overridden from DesktopRootWindowHost: | 32 // Overridden from DesktopRootWindowHost: |
26 virtual void Init(aura::Window* content_window, | 33 virtual void Init(aura::Window* content_window, |
27 const Widget::InitParams& params) OVERRIDE; | 34 const Widget::InitParams& params) OVERRIDE; |
| 35 virtual void Close() OVERRIDE; |
| 36 virtual void CloseNow() OVERRIDE; |
| 37 virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE; |
28 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE; | 38 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE; |
| 39 virtual bool IsVisible() const OVERRIDE; |
| 40 virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE; |
29 | 41 |
30 // Overridden from aura::RootWindowHost: | 42 // Overridden from aura::RootWindowHost: |
31 virtual aura::RootWindow* GetRootWindow() OVERRIDE; | 43 virtual aura::RootWindow* GetRootWindow() OVERRIDE; |
32 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 44 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
33 virtual void Show() OVERRIDE; | 45 virtual void Show() OVERRIDE; |
34 virtual void Hide() OVERRIDE; | 46 virtual void Hide() OVERRIDE; |
35 virtual void ToggleFullScreen() OVERRIDE; | 47 virtual void ToggleFullScreen() OVERRIDE; |
36 virtual gfx::Rect GetBounds() const OVERRIDE; | 48 virtual gfx::Rect GetBounds() const OVERRIDE; |
37 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 49 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
38 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 50 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 virtual bool PreHandleMSG(UINT message, | 133 virtual bool PreHandleMSG(UINT message, |
122 WPARAM w_param, | 134 WPARAM w_param, |
123 LPARAM l_param, | 135 LPARAM l_param, |
124 LRESULT* result) OVERRIDE; | 136 LRESULT* result) OVERRIDE; |
125 virtual void PostHandleMSG(UINT message, | 137 virtual void PostHandleMSG(UINT message, |
126 WPARAM w_param, | 138 WPARAM w_param, |
127 LPARAM l_param) OVERRIDE; | 139 LPARAM l_param) OVERRIDE; |
128 | 140 |
129 scoped_ptr<aura::RootWindow> root_window_; | 141 scoped_ptr<aura::RootWindow> root_window_; |
130 scoped_ptr<HWNDMessageHandler> message_handler_; | 142 scoped_ptr<HWNDMessageHandler> message_handler_; |
| 143 scoped_ptr<DesktopCaptureClient> capture_client_; |
| 144 scoped_ptr<aura::DesktopActivationClient> activation_client_; |
| 145 scoped_ptr<aura::DesktopDispatcherClient> dispatcher_client_; |
| 146 scoped_ptr<aura::FocusManager> focus_manager_; |
131 | 147 |
132 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura | 148 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura |
133 // instead of providing this route back to Widget. | 149 // instead of providing this route back to Widget. |
134 internal::NativeWidgetDelegate* native_widget_delegate_; | 150 internal::NativeWidgetDelegate* native_widget_delegate_; |
135 | 151 |
136 aura::RootWindowHostDelegate* root_window_host_delegate_; | 152 aura::RootWindowHostDelegate* root_window_host_delegate_; |
137 aura::Window* content_window_; | 153 aura::Window* content_window_; |
138 | 154 |
139 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin); | 155 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin); |
140 }; | 156 }; |
141 | 157 |
142 } // namespace views | 158 } // namespace views |
143 | 159 |
144 #endif // UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ | 160 #endif // UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ |
OLD | NEW |