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

Unified Diff: views/widget/widget_win.cc

Issue 6688049: New InputMethod api for Views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update according to review feedbacks. Created 9 years, 9 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
« views/widget/widget.h ('K') | « views/widget/widget_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_win.cc
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index bd8a049ac938a060ad9541ca7748afabe0b00f85..6badb94790e8444fe8b3720faf663264d6bdf869 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* from,
+ const Widget* to,
+ gfx::Rect* rect) {
+ DCHECK(from);
+ DCHECK(to);
+ DCHECK(rect);
+
+ HWND from_hwnd = from->GetNativeView();
+ HWND to_hwnd = to->GetNativeView();
+ if (from_hwnd == to_hwnd)
+ return true;
+
+ RECT win_rect = rect->ToRECT();
+ if (::MapWindowPoints(from_hwnd, to_hwnd,
+ reinterpret_cast<LPPOINT>(&win_rect),
+ sizeof(RECT)/sizeof(POINT))) {
+ *rect = win_rect;
+ return true;
+ }
+ return false;
+}
+
////////////////////////////////////////////////////////////////////////////////
// NativeWidget, public:
« views/widget/widget.h ('K') | « views/widget/widget_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698