| Index: ui/views/win/hwnd_util_aurawin.cc
|
| diff --git a/ui/views/win/hwnd_util_aurawin.cc b/ui/views/win/hwnd_util_aurawin.cc
|
| index fa88c2d0ad07793cf7b94bbc14b96a0e1ce3adfa..a8f68218f3fb542e2ac3dcbd746984acc9286b40 100644
|
| --- a/ui/views/win/hwnd_util_aurawin.cc
|
| +++ b/ui/views/win/hwnd_util_aurawin.cc
|
| @@ -27,4 +27,20 @@ HWND HWNDForNativeWindow(gfx::NativeWindow window) {
|
| window->GetRootWindow()->GetAcceleratedWidget() : NULL;
|
| }
|
|
|
| +gfx::Rect GetWindowBoundsForClientBounds(View* view,
|
| + const gfx::Rect& client_bounds) {
|
| + DCHECK(view);
|
| + aura::RootWindow* window =
|
| + view->GetWidget()->GetNativeWindow()->GetRootWindow();
|
| + if (window) {
|
| + HWND hwnd = window->GetAcceleratedWidget();
|
| + 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);
|
| + }
|
| + return client_bounds;
|
| }
|
| +
|
| +} // namespace views
|
|
|