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

Unified Diff: chrome/browser/views/autocomplete/autocomplete_popup_win.cc

Issue 160378: Make TOOLKIT_VIEWS port use views-based Autocomplete popup.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « chrome/browser/views/autocomplete/autocomplete_popup_win.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/autocomplete/autocomplete_popup_win.cc
===================================================================
--- chrome/browser/views/autocomplete/autocomplete_popup_win.cc (revision 21913)
+++ chrome/browser/views/autocomplete/autocomplete_popup_win.cc (working copy)
@@ -24,10 +24,10 @@
AutocompletePopupWin::~AutocompletePopupWin() {
}
-void AutocompletePopupWin::Init(AutocompleteEditViewWin* edit_view,
+void AutocompletePopupWin::Init(AutocompleteEditView* edit_view,
views::View* contents) {
// Create the popup
- WidgetWin::Init(edit_view->parent_view()->GetWidget()->GetNativeView(),
+ WidgetWin::Init(GetAncestor(edit_view->GetNativeView(), GA_ROOT),
contents_->GetPopupBounds());
// The contents is owned by the LocationBarView.
contents_->SetParentOwned(false);
@@ -38,7 +38,7 @@
// Otherwise, show this popup window under top-most windows.
// TODO(hbono): http://b/1111369 if we exclude this popup window from the
// display area of IME windows, this workaround becomes unnecessary.
- HWND ime_window = ImmGetDefaultIMEWnd(edit_view->m_hWnd);
+ HWND ime_window = ImmGetDefaultIMEWnd(edit_view->GetNativeView());
SetWindowPos(ime_window ? ime_window : HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_SHOWWINDOW);
}
@@ -51,6 +51,14 @@
WidgetWin::Show();
}
+bool AutocompletePopupWin::IsOpen() const {
+ return IsCreated() && IsVisible();
+}
+
+bool AutocompletePopupWin::IsCreated() const {
+ return !!IsWindow();
+}
+
////////////////////////////////////////////////////////////////////////////////
// AutocompletePopupWin, WidgetWin overrides:
« no previous file with comments | « chrome/browser/views/autocomplete/autocomplete_popup_win.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698