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

Side by Side Diff: views/window/window_win.h

Issue 304007: Make sure the RootView is sized to the correct bounds when the opaque frame i... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 VIEWS_WINDOW_WINDOW_WIN_H_ 5 #ifndef VIEWS_WINDOW_WINDOW_WIN_H_
6 #define VIEWS_WINDOW_WINDOW_WIN_H_ 6 #define VIEWS_WINDOW_WINDOW_WIN_H_
7 7
8 #include "views/widget/widget_win.h" 8 #include "views/widget/widget_win.h"
9 #include "views/window/window.h" 9 #include "views/window/window.h"
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // Create the Window. 96 // Create the Window.
97 // If parent is NULL, this WindowWin is top level on the desktop. 97 // If parent is NULL, this WindowWin is top level on the desktop.
98 // If |bounds| is empty, the view is queried for its preferred size and 98 // If |bounds| is empty, the view is queried for its preferred size and
99 // centered on screen. 99 // centered on screen.
100 virtual void Init(HWND parent, const gfx::Rect& bounds); 100 virtual void Init(HWND parent, const gfx::Rect& bounds);
101 101
102 // Sizes the window to the default size specified by its ClientView. 102 // Sizes the window to the default size specified by its ClientView.
103 virtual void SizeWindowToDefault(); 103 virtual void SizeWindowToDefault();
104 104
105 // Returns the insets of the client area relative to the non-client area of
106 // the window. Override this function instead of OnNCCalcSize, which is
107 // crazily complicated.
108 virtual gfx::Insets GetClientAreaInsets() const;
109
105 // Shows the system menu at the specified screen point. 110 // Shows the system menu at the specified screen point.
106 void RunSystemMenu(const gfx::Point& point); 111 void RunSystemMenu(const gfx::Point& point);
107 112
108 // Overridden from WidgetWin: 113 // Overridden from WidgetWin:
109 virtual void OnActivate(UINT action, BOOL minimized, HWND window); 114 virtual void OnActivate(UINT action, BOOL minimized, HWND window);
110 virtual void OnActivateApp(BOOL active, DWORD thread_id); 115 virtual void OnActivateApp(BOOL active, DWORD thread_id);
111 virtual LRESULT OnAppCommand(HWND window, short app_command, WORD device, 116 virtual LRESULT OnAppCommand(HWND window, short app_command, WORD device,
112 int keystate); 117 int keystate);
113 virtual void OnCommand(UINT notification_code, int command_id, HWND window); 118 virtual void OnCommand(UINT notification_code, int command_id, HWND window);
114 virtual void OnDestroy(); 119 virtual void OnDestroy();
115 virtual LRESULT OnDwmCompositionChanged(UINT msg, WPARAM w_param, 120 virtual LRESULT OnDwmCompositionChanged(UINT msg, WPARAM w_param,
116 LPARAM l_param); 121 LPARAM l_param);
117 virtual void OnFinalMessage(HWND window); 122 virtual void OnFinalMessage(HWND window);
118 virtual void OnGetMinMaxInfo(MINMAXINFO* minmax_info); 123 virtual void OnGetMinMaxInfo(MINMAXINFO* minmax_info);
119 virtual void OnInitMenu(HMENU menu); 124 virtual void OnInitMenu(HMENU menu);
120 virtual void OnMouseLeave(); 125 virtual void OnMouseLeave();
121 virtual LRESULT OnNCActivate(BOOL active); 126 virtual LRESULT OnNCActivate(BOOL active);
122 virtual LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param); 127 LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param); // Don't override.
123 virtual LRESULT OnNCHitTest(const CPoint& point); 128 virtual LRESULT OnNCHitTest(const CPoint& point);
124 virtual void OnNCPaint(HRGN rgn); 129 virtual void OnNCPaint(HRGN rgn);
125 virtual void OnNCLButtonDown(UINT ht_component, const CPoint& point); 130 virtual void OnNCLButtonDown(UINT ht_component, const CPoint& point);
126 virtual void OnNCRButtonDown(UINT ht_component, const CPoint& point); 131 virtual void OnNCRButtonDown(UINT ht_component, const CPoint& point);
127 virtual void OnNCRButtonUp(UINT ht_component, const CPoint& point); 132 virtual void OnNCRButtonUp(UINT ht_component, const CPoint& point);
128 virtual void OnRButtonUp(UINT ht_component, const CPoint& point); 133 virtual void OnRButtonUp(UINT ht_component, const CPoint& point);
129 virtual LRESULT OnNCUAHDrawCaption(UINT msg, WPARAM w_param, LPARAM l_param); 134 virtual LRESULT OnNCUAHDrawCaption(UINT msg, WPARAM w_param, LPARAM l_param);
130 virtual LRESULT OnNCUAHDrawFrame(UINT msg, WPARAM w_param, LPARAM l_param); 135 virtual LRESULT OnNCUAHDrawFrame(UINT msg, WPARAM w_param, LPARAM l_param);
131 virtual LRESULT OnSetIcon(UINT size_type, HICON new_icon); 136 virtual LRESULT OnSetIcon(UINT size_type, HICON new_icon);
132 virtual LRESULT OnSetText(const wchar_t* text); 137 virtual LRESULT OnSetText(const wchar_t* text);
133 virtual void OnSettingChange(UINT flags, const wchar_t* section); 138 virtual void OnSettingChange(UINT flags, const wchar_t* section);
134 virtual void OnSize(UINT size_param, const CSize& new_size); 139 virtual void OnSize(UINT size_param, const CSize& new_size);
135 virtual void OnSysCommand(UINT notification_code, CPoint click); 140 virtual void OnSysCommand(UINT notification_code, CPoint click);
136 virtual void OnWindowPosChanging(WINDOWPOS* window_pos); 141 virtual void OnWindowPosChanging(WINDOWPOS* window_pos);
137 virtual Window* GetWindow() { return this; } 142 virtual Window* GetWindow() { return this; }
138 virtual const Window* GetWindow() const { return this; } 143 virtual const Window* GetWindow() const { return this; }
144 virtual gfx::Size GetRootViewSize() const;
139 145
140 // Accessor for disable_inactive_rendering_. 146 // Accessor for disable_inactive_rendering_.
141 bool disable_inactive_rendering() const { 147 bool disable_inactive_rendering() const {
142 return disable_inactive_rendering_; 148 return disable_inactive_rendering_;
143 } 149 }
144 150
145 private: 151 private:
146 // Information saved before going into fullscreen mode, used to restore the 152 // Information saved before going into fullscreen mode, used to restore the
147 // window afterwards. 153 // window afterwards.
148 struct SavedWindowInfo { 154 struct SavedWindowInfo {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 // used to catch updates to the rect and work area and react accordingly. 296 // used to catch updates to the rect and work area and react accordingly.
291 HMONITOR last_monitor_; 297 HMONITOR last_monitor_;
292 gfx::Rect last_monitor_rect_, last_work_area_; 298 gfx::Rect last_monitor_rect_, last_work_area_;
293 299
294 DISALLOW_COPY_AND_ASSIGN(WindowWin); 300 DISALLOW_COPY_AND_ASSIGN(WindowWin);
295 }; 301 };
296 302
297 } // namespace views 303 } // namespace views
298 304
299 #endif // VIEWS_WINDOW_WINDOW_WIN_H_ 305 #endif // VIEWS_WINDOW_WINDOW_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698