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

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: Don't dispatch the character when focus was changed by the key event. 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
« no previous file with comments | « 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 f50dfbc27664a02d1afa0ca81d7e363a31e8e720..64d73ffc933b306566c575ff709a9543c61c53f4 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:
« no previous file with comments | « views/widget/widget_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698