| Index: views/widget/widget_win.cc
|
| diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
|
| index f57e43b76639e0020409ff3b9dfd3ef4fe4099a4..4a00b483eb95dbfe9721de95f4e9642d18f16ced 100644
|
| --- a/views/widget/widget_win.cc
|
| +++ b/views/widget/widget_win.cc
|
| @@ -1213,6 +1213,28 @@ void Widget::NotifyLocaleChanged() {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| +bool Widget::ConvertRect(const Widget* source,
|
| + const Widget* target,
|
| + gfx::Rect* rect) {
|
| + DCHECK(source);
|
| + DCHECK(target);
|
| + DCHECK(rect);
|
| +
|
| + HWND source_hwnd = source->GetNativeView();
|
| + HWND target_hwnd = target->GetNativeView();
|
| + if (source_hwnd == target_hwnd)
|
| + return true;
|
| +
|
| + RECT win_rect = rect->ToRECT();
|
| + if (::MapWindowPoints(source_hwnd, target_hwnd,
|
| + reinterpret_cast<LPPOINT>(&win_rect),
|
| + sizeof(RECT)/sizeof(POINT))) {
|
| + *rect = win_rect;
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // NativeWidget, public:
|
|
|
|
|