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

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: Add an OWNERS file. 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/ime/text_input_client.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 147c443a05f2939121c1bba2f7fc83a986905064..8db1a2ca666b18513d66aeb9e1ab2012ba7ae867 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -1212,6 +1212,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:
« views/ime/text_input_client.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