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

Unified Diff: chrome/views/window/non_client_view.cc

Issue 60003: Merge r12930.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/views/window/non_client_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/window/non_client_view.cc
===================================================================
--- chrome/views/window/non_client_view.cc (revision 12934)
+++ chrome/views/window/non_client_view.cc (working copy)
@@ -112,15 +112,7 @@
frame_view_->ResetWindowControls();
}
-////////////////////////////////////////////////////////////////////////////////
-// NonClientView, View overrides:
-
-gfx::Size NonClientView::GetPreferredSize() {
- gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize());
- return GetWindowBoundsForClientBounds(client_bounds).size();
-}
-
-void NonClientView::Layout() {
+void NonClientView::LayoutFrameView() {
// First layout the NonClientFrameView, which determines the size of the
// ClientView...
frame_view_->SetBounds(0, 0, width(), height());
@@ -133,7 +125,19 @@
// to do nothing so that SetBounds above doesn't cause Layout to be called
// twice.
frame_view_->Layout();
+}
+////////////////////////////////////////////////////////////////////////////////
+// NonClientView, View overrides:
+
+gfx::Size NonClientView::GetPreferredSize() {
+ gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize());
+ return GetWindowBoundsForClientBounds(client_bounds).size();
+}
+
+void NonClientView::Layout() {
+ LayoutFrameView();
+
// Then layout the ClientView, using those bounds.
client_view_->SetBounds(frame_view_->GetBoundsForClientView());
« no previous file with comments | « chrome/views/window/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698