• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_win.h"
6 
7 ////////////////////////////////////////////////////////////////////////////////
8 // AutocompletePopupWin, public:
9 
AutocompletePopupWin()10 AutocompletePopupWin::AutocompletePopupWin() {
11 }
12 
~AutocompletePopupWin()13 AutocompletePopupWin::~AutocompletePopupWin() {
14 }
15 
GetRelativeWindowForPopup(gfx::NativeView edit_native_view) const16 gfx::NativeView AutocompletePopupWin::GetRelativeWindowForPopup(
17     gfx::NativeView edit_native_view) const {
18   // When an IME is attached to the rich-edit control, retrieve its window
19   // handle and show this popup window under the IME windows.
20   // Otherwise, show this popup window under top-most windows.
21   // TODO(hbono): http://b/1111369 if we exclude this popup window from the
22   // display area of IME windows, this workaround becomes unnecessary.
23   HWND ime_window = ImmGetDefaultIMEWnd(edit_native_view);
24   return ime_window ? ime_window : HWND_NOTOPMOST;
25 }
26