| 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_WINDOW_TREE_HOST_WIN_H_ | 5 #ifndef UI_AURA_WINDOW_TREE_HOST_WIN_H_ |
| 6 #define UI_AURA_WINDOW_TREE_HOST_WIN_H_ | 6 #define UI_AURA_WINDOW_TREE_HOST_WIN_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
| 10 #include "ui/aura/window_tree_host.h" | 10 #include "ui/aura/window_tree_host.h" |
| 11 #include "ui/events/event_source.h" | 11 #include "ui/events/event_source.h" |
| 12 #include "ui/gfx/win/window_impl.h" | 12 #include "ui/gfx/win/window_impl.h" |
| 13 | 13 |
| 14 namespace aura { | 14 namespace aura { |
| 15 | 15 |
| 16 class WindowTreeHostWin : public WindowTreeHost, | 16 class AURA_EXPORT WindowTreeHostWin : public WindowTreeHost, |
| 17 public ui::EventSource, | 17 public ui::EventSource, |
| 18 public gfx::WindowImpl { | 18 public gfx::WindowImpl { |
| 19 public: | 19 public: |
| 20 WindowTreeHostWin(const gfx::Rect& bounds); | 20 explicit WindowTreeHostWin(const gfx::Rect& bounds); |
| 21 virtual ~WindowTreeHostWin(); | 21 virtual ~WindowTreeHostWin(); |
| 22 // WindowTreeHost: | 22 // WindowTreeHost: |
| 23 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 23 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
| 24 virtual void Show() OVERRIDE; | 24 virtual void Show() OVERRIDE; |
| 25 virtual void Hide() OVERRIDE; | 25 virtual void Hide() OVERRIDE; |
| 26 virtual void ToggleFullScreen() OVERRIDE; | |
| 27 virtual gfx::Rect GetBounds() const OVERRIDE; | 26 virtual gfx::Rect GetBounds() const OVERRIDE; |
| 28 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 27 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
| 29 virtual gfx::Insets GetInsets() const OVERRIDE; | |
| 30 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; | |
| 31 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 28 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
| 32 virtual void SetCapture() OVERRIDE; | 29 virtual void SetCapture() OVERRIDE; |
| 33 virtual void ReleaseCapture() OVERRIDE; | 30 virtual void ReleaseCapture() OVERRIDE; |
| 34 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; | 31 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; |
| 35 virtual bool ConfineCursorToRootWindow() OVERRIDE; | |
| 36 virtual void UnConfineCursor() OVERRIDE; | |
| 37 virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE; | 32 virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE; |
| 38 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; | 33 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; |
| 39 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; | 34 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; |
| 40 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; | 35 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; |
| 41 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 36 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 42 | 37 |
| 43 // ui::EventSource: | 38 // ui::EventSource: |
| 44 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; | 39 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; |
| 45 | 40 |
| 46 private: | 41 private: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 72 | 67 |
| 73 void OnClose(); | 68 void OnClose(); |
| 74 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param); | 69 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param); |
| 75 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param); | 70 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param); |
| 76 LRESULT OnCaptureChanged(UINT message, WPARAM w_param, LPARAM l_param); | 71 LRESULT OnCaptureChanged(UINT message, WPARAM w_param, LPARAM l_param); |
| 77 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param); | 72 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param); |
| 78 void OnMove(const gfx::Point& point); | 73 void OnMove(const gfx::Point& point); |
| 79 void OnPaint(HDC dc); | 74 void OnPaint(HDC dc); |
| 80 void OnSize(UINT param, const gfx::Size& size); | 75 void OnSize(UINT param, const gfx::Size& size); |
| 81 | 76 |
| 82 bool fullscreen_; | |
| 83 bool has_capture_; | 77 bool has_capture_; |
| 84 RECT saved_window_rect_; | |
| 85 DWORD saved_window_style_; | |
| 86 DWORD saved_window_ex_style_; | |
| 87 | 78 |
| 88 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin); | 79 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin); |
| 89 }; | 80 }; |
| 90 | 81 |
| 91 namespace test { | 82 namespace test { |
| 92 | 83 |
| 93 // Set true to let WindowTreeHostWin use a popup window | 84 // Set true to let WindowTreeHostWin use a popup window |
| 94 // with no frame/title so that the window size and test's | 85 // with no frame/title so that the window size and test's |
| 95 // expectations matches. | 86 // expectations matches. |
| 96 AURA_EXPORT void SetUsePopupAsRootWindowForTest(bool use); | 87 AURA_EXPORT void SetUsePopupAsRootWindowForTest(bool use); |
| 97 | 88 |
| 98 } // namespace | 89 } // namespace |
| 99 | 90 |
| 100 } // namespace aura | 91 } // namespace aura |
| 101 | 92 |
| 102 #endif // UI_AURA_WINDOW_TREE_HOST_WIN_H_ | 93 #endif // UI_AURA_WINDOW_TREE_HOST_WIN_H_ |
| OLD | NEW |