summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 20:44:56 +0000
committerasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 20:44:56 +0000
commit13eb229606d6ec40aa0ef0fbf2265cba9ca5683c (patch)
tree6f83c81ecdf00df5c7b59d472d748efe01a87284
parenta27a92efe4dd9eb4d71e48e1bbc4c6953fa13971 (diff)
downloadchromium_src-13eb229606d6ec40aa0ef0fbf2265cba9ca5683c.zip
chromium_src-13eb229606d6ec40aa0ef0fbf2265cba9ca5683c.tar.gz
chromium_src-13eb229606d6ec40aa0ef0fbf2265cba9ca5683c.tar.bz2
Don't add GetWindowBoundsForClientBounds() in NativeFrameView's GetPreferredSize().
This is no longer necessary as this is now accounted for in native_widget_win.cc as of http://crrev.com/92600. BUG=89631 TEST=Open about box and check its size. Open alert() dialog and check its size. Review URL: http://codereview.chromium.org/7437002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93095 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--views/window/native_frame_view.cc7
-rw-r--r--views/window/native_frame_view.h7
2 files changed, 8 insertions, 6 deletions
diff --git a/views/window/native_frame_view.cc b/views/window/native_frame_view.cc
index 67b0cbd..2eafa23 100644
--- a/views/window/native_frame_view.cc
+++ b/views/window/native_frame_view.cc
@@ -42,7 +42,7 @@ gfx::Rect NativeFrameView::GetWindowBoundsForClientBounds(
return gfx::Rect(rect);
#else
// TODO(sad):
- return gfx::Rect(client_bounds);
+ return client_bounds;
#endif
}
@@ -68,10 +68,7 @@ void NativeFrameView::UpdateWindowIcon() {
}
gfx::Size NativeFrameView::GetPreferredSize() {
- gfx::Size pref = frame_->client_view()->GetPreferredSize();
- gfx::Rect bounds(0, 0, pref.width(), pref.height());
- return frame_->non_client_view()->GetWindowBoundsForClientBounds(
- bounds).size();
+ return frame_->client_view()->GetPreferredSize();
}
} // namespace views
diff --git a/views/window/native_frame_view.h b/views/window/native_frame_view.h
index 6c50648..4a05d1b 100644
--- a/views/window/native_frame_view.h
+++ b/views/window/native_frame_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -29,6 +29,11 @@ class NativeFrameView : public NonClientFrameView {
virtual void UpdateWindowIcon() OVERRIDE;
// View overrides:
+
+ // Returns the client size. On Windows, this is the expected behavior for
+ // native frames (see |NativeWidgetWin::WidgetSizeIsClientSize()|), while
+ // other platforms currently always return client bounds from
+ // |GetWindowBoundsForClientBounds()|.
virtual gfx::Size GetPreferredSize() OVERRIDE;
private: