Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: ui/aura/root_window_host_win.h

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window_host_ozone.cc ('k') | ui/aura/root_window_host_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/window_tree_host.h" 9 #include "ui/aura/window_tree_host.h"
10 #include "ui/base/ui_export.h" 10 #include "ui/base/ui_export.h"
11 #include "ui/gfx/win/window_impl.h" 11 #include "ui/gfx/win/window_impl.h"
12 12
13 namespace aura { 13 namespace aura {
14 14
15 class RootWindowHostWin : public RootWindowHost, public gfx::WindowImpl { 15 class RootWindowHostWin : public RootWindowHost, public gfx::WindowImpl {
16 public: 16 public:
17 RootWindowHostWin(const gfx::Rect& bounds); 17 RootWindowHostWin(const gfx::Rect& bounds);
18 virtual ~RootWindowHostWin(); 18 virtual ~RootWindowHostWin();
19 // RootWindowHost: 19 // RootWindowHost:
20 virtual void SetDelegate(RootWindowHostDelegate* delegate) OVERRIDE;
21 virtual RootWindow* GetRootWindow() OVERRIDE; 20 virtual RootWindow* GetRootWindow() OVERRIDE;
22 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; 21 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
23 virtual void Show() OVERRIDE; 22 virtual void Show() OVERRIDE;
24 virtual void Hide() OVERRIDE; 23 virtual void Hide() OVERRIDE;
25 virtual void ToggleFullScreen() OVERRIDE; 24 virtual void ToggleFullScreen() OVERRIDE;
26 virtual gfx::Rect GetBounds() const OVERRIDE; 25 virtual gfx::Rect GetBounds() const OVERRIDE;
27 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; 26 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
28 virtual gfx::Insets GetInsets() const OVERRIDE; 27 virtual gfx::Insets GetInsets() const OVERRIDE;
29 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; 28 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE;
30 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; 29 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
31 virtual void SetCapture() OVERRIDE; 30 virtual void SetCapture() OVERRIDE;
32 virtual void ReleaseCapture() OVERRIDE; 31 virtual void ReleaseCapture() OVERRIDE;
33 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; 32 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
34 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE; 33 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
35 virtual bool ConfineCursorToRootWindow() OVERRIDE; 34 virtual bool ConfineCursorToRootWindow() OVERRIDE;
36 virtual void UnConfineCursor() OVERRIDE; 35 virtual void UnConfineCursor() OVERRIDE;
37 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE; 36 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE;
38 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE; 37 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
39 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE;
40 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; 38 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE;
41 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; 39 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
42 virtual void PrepareForShutdown() OVERRIDE; 40 virtual void PrepareForShutdown() OVERRIDE;
43 41
44 private: 42 private:
45 BEGIN_MSG_MAP_EX(RootWindowHostWin) 43 BEGIN_MSG_MAP_EX(RootWindowHostWin)
46 // Range handlers must go first! 44 // Range handlers must go first!
47 MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) 45 MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
48 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange) 46 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange)
49 47
(...skipping 18 matching lines...) Expand all
68 66
69 void OnClose(); 67 void OnClose();
70 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param); 68 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param);
71 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param); 69 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param);
72 LRESULT OnCaptureChanged(UINT message, WPARAM w_param, LPARAM l_param); 70 LRESULT OnCaptureChanged(UINT message, WPARAM w_param, LPARAM l_param);
73 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param); 71 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param);
74 void OnMove(const CPoint& point); 72 void OnMove(const CPoint& point);
75 void OnPaint(HDC dc); 73 void OnPaint(HDC dc);
76 void OnSize(UINT param, const CSize& size); 74 void OnSize(UINT param, const CSize& size);
77 75
78 RootWindowHostDelegate* delegate_;
79
80 bool fullscreen_; 76 bool fullscreen_;
81 bool has_capture_; 77 bool has_capture_;
82 RECT saved_window_rect_; 78 RECT saved_window_rect_;
83 DWORD saved_window_style_; 79 DWORD saved_window_style_;
84 DWORD saved_window_ex_style_; 80 DWORD saved_window_ex_style_;
85 81
86 DISALLOW_COPY_AND_ASSIGN(RootWindowHostWin); 82 DISALLOW_COPY_AND_ASSIGN(RootWindowHostWin);
87 }; 83 };
88 84
89 namespace test { 85 namespace test {
90 86
91 // Set true to let RootWindowHostWin use a popup window 87 // Set true to let RootWindowHostWin use a popup window
92 // with no frame/title so that the window size and test's 88 // with no frame/title so that the window size and test's
93 // expectations matches. 89 // expectations matches.
94 AURA_EXPORT void SetUsePopupAsRootWindowForTest(bool use); 90 AURA_EXPORT void SetUsePopupAsRootWindowForTest(bool use);
95 91
96 } // namespace 92 } // namespace
97 93
98 } // namespace aura 94 } // namespace aura
99 95
100 #endif // UI_AURA_ROOT_WINDOW_HOST_WIN_H_ 96 #endif // UI_AURA_ROOT_WINDOW_HOST_WIN_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_ozone.cc ('k') | ui/aura/root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698