Index: views/widget/widget_win.cc |
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc |
index bd8a049ac938a060ad9541ca7748afabe0b00f85..ea1269804756c93b70e4aa308bd4b0ed1a4d86b1 100644 |
--- a/views/widget/widget_win.cc |
+++ b/views/widget/widget_win.cc |
@@ -1208,6 +1208,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: |