| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 virtual bool PreHandleMSG(UINT message, | 132 virtual bool PreHandleMSG(UINT message, |
| 121 WPARAM w_param, | 133 WPARAM w_param, |
| 122 LPARAM l_param, | 134 LPARAM l_param, |
| 123 LRESULT* result) OVERRIDE; | 135 LRESULT* result) OVERRIDE; |
| 124 virtual void PostHandleMSG(UINT message, | 136 virtual void PostHandleMSG(UINT message, |
| 125 WPARAM w_param, | 137 WPARAM w_param, |
| 126 LPARAM l_param) OVERRIDE; | 138 LPARAM l_param) OVERRIDE; |
| 127 | 139 |
| 128 scoped_ptr<aura::RootWindow> root_window_; | 140 scoped_ptr<aura::RootWindow> root_window_; |
| 129 scoped_ptr<HWNDMessageHandler> message_handler_; | 141 scoped_ptr<HWNDMessageHandler> message_handler_; |
| 142 scoped_ptr<DesktopCaptureClient> capture_client_; |
| 143 scoped_ptr<aura::DesktopActivationClient> activation_client_; |
| 144 scoped_ptr<aura::DesktopDispatcherClient> dispatcher_client_; |
| 145 scoped_ptr<aura::FocusManager> focus_manager_; |
| 130 | 146 |
| 131 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura | 147 // TODO(beng): Consider providing an interface to DesktopNativeWidgetAura |
| 132 // instead of providing this route back to Widget. | 148 // instead of providing this route back to Widget. |
| 133 internal::NativeWidgetDelegate* native_widget_delegate_; | 149 internal::NativeWidgetDelegate* native_widget_delegate_; |
| 134 | 150 |
| 135 aura::RootWindowHostDelegate* root_window_host_delegate_; | 151 aura::RootWindowHostDelegate* root_window_host_delegate_; |
| 136 aura::Window* content_window_; | 152 aura::Window* content_window_; |
| 137 | 153 |
| 138 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin); | 154 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin); |
| 139 }; | 155 }; |
| 140 | 156 |
| 141 } // namespace views | 157 } // namespace views |
| 142 | 158 |
| 143 #endif // UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ | 159 #endif // UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ |
| OLD | NEW |