| 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_AURA_ROOT_WINDOW_HOST_WIN_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_HOST_WIN_H_ |
| 6 #define UI_AURA_ROOT_WINDOW_HOST_WIN_H_ | 6 #define UI_AURA_ROOT_WINDOW_HOST_WIN_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ui/aura/root_window_host.h" | 9 #include "ui/aura/root_window_host.h" |
| 10 #include "ui/base/win/window_impl.h" | 10 #include "ui/base/win/window_impl.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 class ViewProp; | 13 class ViewProp; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace aura { | 16 namespace aura { |
| 17 | 17 |
| 18 class RootWindowHostWin : public RootWindowHost, public ui::WindowImpl { | 18 class RootWindowHostWin : public RootWindowHost, public ui::WindowImpl { |
| 19 public: | 19 public: |
| 20 explicit RootWindowHostWin(const gfx::Rect& bounds); | 20 explicit RootWindowHostWin(const gfx::Rect& bounds); |
| 21 virtual ~RootWindowHostWin(); | 21 virtual ~RootWindowHostWin(); |
| 22 | 22 |
| 23 // RootWindowHost: | 23 // RootWindowHost: |
| 24 virtual void SetRootWindow(RootWindow* root_window) OVERRIDE; | 24 virtual void SetRootWindow(RootWindow* root_window) OVERRIDE; |
| 25 virtual RootWindow* GetRootWindow() OVERRIDE; | 25 virtual RootWindow* GetRootWindow() OVERRIDE; |
| 26 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 26 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
| 27 virtual gfx::AcceleratedWidget GetAcceleratedWidgetUsedForEvents() OVERRIDE; |
| 27 virtual void Show() OVERRIDE; | 28 virtual void Show() OVERRIDE; |
| 28 virtual void ToggleFullScreen() OVERRIDE; | 29 virtual void ToggleFullScreen() OVERRIDE; |
| 29 virtual gfx::Rect GetBounds() const OVERRIDE; | 30 virtual gfx::Rect GetBounds() const OVERRIDE; |
| 30 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 31 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 31 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 32 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
| 32 virtual void SetCapture() OVERRIDE; | 33 virtual void SetCapture() OVERRIDE; |
| 33 virtual void ReleaseCapture() OVERRIDE; | 34 virtual void ReleaseCapture() OVERRIDE; |
| 34 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | 35 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; |
| 35 virtual void ShowCursor(bool show) OVERRIDE; | 36 virtual void ShowCursor(bool show) OVERRIDE; |
| 36 virtual gfx::Point QueryMouseLocation() OVERRIDE; | 37 virtual gfx::Point QueryMouseLocation() OVERRIDE; |
| 37 virtual bool ConfineCursorToRootWindow() OVERRIDE; | 38 virtual bool ConfineCursorToRootWindow() OVERRIDE; |
| 38 virtual void UnConfineCursor() OVERRIDE; | 39 virtual void UnConfineCursor() OVERRIDE; |
| 39 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; | 40 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; |
| 40 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE; | 41 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE; |
| 41 virtual bool GrabSnapshot( | 42 virtual bool GrabSnapshot( |
| 42 const gfx::Rect& snapshot_bounds, | 43 const gfx::Rect& snapshot_bounds, |
| 43 std::vector<unsigned char>* png_representation) OVERRIDE; | 44 std::vector<unsigned char>* png_representation) OVERRIDE; |
| 44 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; | 45 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; |
| 46 virtual bool DispatchNativeEvent( |
| 47 const base::NativeEvent& native_event) OVERRIDE; |
| 45 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 48 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 46 | 49 |
| 47 private: | 50 private: |
| 48 BEGIN_MSG_MAP_EX(RootWindowHostWin) | 51 BEGIN_MSG_MAP_EX(RootWindowHostWin) |
| 49 // Range handlers must go first! | 52 // Range handlers must go first! |
| 50 MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) | 53 MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) |
| 51 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange) | 54 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange) |
| 52 | 55 |
| 53 // Mouse capture events. | 56 // Mouse capture events. |
| 54 MESSAGE_HANDLER_EX(WM_CAPTURECHANGED, OnCaptureChanged) | 57 MESSAGE_HANDLER_EX(WM_CAPTURECHANGED, OnCaptureChanged) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 83 DWORD saved_window_ex_style_; | 86 DWORD saved_window_ex_style_; |
| 84 | 87 |
| 85 scoped_ptr<ui::ViewProp> prop_; | 88 scoped_ptr<ui::ViewProp> prop_; |
| 86 | 89 |
| 87 DISALLOW_COPY_AND_ASSIGN(RootWindowHostWin); | 90 DISALLOW_COPY_AND_ASSIGN(RootWindowHostWin); |
| 88 }; | 91 }; |
| 89 | 92 |
| 90 } // namespace aura | 93 } // namespace aura |
| 91 | 94 |
| 92 #endif // UI_AURA_ROOT_WINDOW_HOST_WIN_H_ | 95 #endif // UI_AURA_ROOT_WINDOW_HOST_WIN_H_ |
| OLD | NEW |