Index: ui/views/window/native_frame_view.cc |
diff --git a/ui/views/window/native_frame_view.cc b/ui/views/window/native_frame_view.cc |
index 0a28110e8affcc23b80f7dd8cb06444fc1e1790c..894c0fada8794a466c925ba2fa824588e43a81cb 100644 |
--- a/ui/views/window/native_frame_view.cc |
+++ b/ui/views/window/native_frame_view.cc |
@@ -7,6 +7,10 @@ |
#include "ui/views/widget/native_widget.h" |
#include "ui/views/widget/widget.h" |
+#if defined(OS_WIN) |
+#include "ui/views/win/hwnd_util.h" |
+#endif |
+ |
namespace views { |
//////////////////////////////////////////////////////////////////////////////// |
@@ -29,12 +33,9 @@ gfx::Rect NativeFrameView::GetBoundsForClientView() const { |
gfx::Rect NativeFrameView::GetWindowBoundsForClientBounds( |
const gfx::Rect& client_bounds) const { |
-#if defined(OS_WIN) && !defined(USE_AURA) |
- RECT rect = client_bounds.ToRECT(); |
- DWORD style = ::GetWindowLong(GetWidget()->GetNativeView(), GWL_STYLE); |
- DWORD ex_style = ::GetWindowLong(GetWidget()->GetNativeView(), GWL_EXSTYLE); |
- AdjustWindowRectEx(&rect, style, FALSE, ex_style); |
- return gfx::Rect(rect); |
+#if defined(OS_WIN) |
+ return views::GetWindowBoundsForClientBounds( |
+ static_cast<View*>(const_cast<NativeFrameView*>(this)), client_bounds); |
#else |
// TODO(sad): |
return client_bounds; |