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

Unified Diff: ui/views/window/native_frame_view.cc

Issue 13896011: Make javascript dialogs into top-level windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix non-aura build. Created 7 years, 8 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 | « ui/views/win/hwnd_util_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ui/views/win/hwnd_util_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698