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

Unified Diff: ui/views/win/hwnd_util_win.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_aurawin.cc ('k') | ui/views/window/native_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_util_win.cc
diff --git a/ui/views/win/hwnd_util_win.cc b/ui/views/win/hwnd_util_win.cc
index 1c642e5240299f7957100128a66766d7a36ff332..094c8ab4ce12acfffe6f26528cd132067b5ac56b 100644
--- a/ui/views/win/hwnd_util_win.cc
+++ b/ui/views/win/hwnd_util_win.cc
@@ -25,4 +25,15 @@ HWND HWNDForNativeWindow(gfx::NativeWindow window) {
return window;
}
+gfx::Rect GetWindowBoundsForClientBounds(View* view,
+ const gfx::Rect& client_bounds) {
+ DCHECK(view);
+ HWND hwnd = view->GetWidget()->GetNativeWindow();
+ RECT rect = client_bounds.ToRECT();
+ DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
+ DWORD ex_style = ::GetWindowLong(hwnd, GWL_EXSTYLE);
+ AdjustWindowRectEx(&rect, style, FALSE, ex_style);
+ return gfx::Rect(rect);
}
+
+} // namespace views
« no previous file with comments | « ui/views/win/hwnd_util_aurawin.cc ('k') | ui/views/window/native_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698