diff options
author | yukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-23 15:06:57 +0000 |
---|---|---|
committer | yukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-23 15:06:57 +0000 |
commit | c337ec220eebfc793ebf233293bc32d6ff18a358 (patch) | |
tree | 596803d584c02a5d8ff40b47e6dee6099490544e | |
parent | 752a526c83686f1de818d84f929eb16adc57ae8b (diff) | |
download | chromium_src-c337ec220eebfc793ebf233293bc32d6ff18a358.zip chromium_src-c337ec220eebfc793ebf233293bc32d6ff18a358.tar.gz chromium_src-c337ec220eebfc793ebf233293bc32d6ff18a358.tar.bz2 |
Fixes an overlap issue of Omnibox suggest and IME candidate window on Windows with Views implementation.
This CL makes Omnibox hide its suggest popup when a IME candidate window is shown. This CL applies to Views implementation on Windows.
This CL assumes https://codereview.chromium.org/17112021/ , which will be committed soon.
BUG=245578
TEST=Test manually.
Review URL: https://chromiumcodereview.appspot.com/17068005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208132 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/views/omnibox/omnibox_view_views.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc index fe31b9e..9458260 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc @@ -585,9 +585,16 @@ bool OmniboxViewViews::IsImeShowingPopup() const { #if defined(OS_CHROMEOS) return ime_candidate_window_open_; #else - // TODO(yukishiino): Implement detection of candidate windows on Windows. - // We can detect whether any candidate window is open or not on Windows. - return OmniboxView::IsImeShowingPopup(); + // We need const_cast here because there is no const version of + // View::GetInputMethod(). It's because Widget::GetInputMethod(), called from + // View::GetInputMethod(), creates a new views::InputMethod at the first-time + // call. Except for this point, none of this method, View::GetInputMethod() + // or Widget::GetInputMethod() modifies the state of their instances. + // TODO(yukishiino): Make {View,Widget}::GetInputMethod() const and make the + // underlying input method object mutable. + const views::InputMethod* input_method = + const_cast<OmniboxViewViews*>(this)->GetInputMethod(); + return input_method && input_method->IsCandidatePopupOpen(); #endif } |