summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 22:38:59 +0000
committeryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-20 22:38:59 +0000
commit4e40d83a011b8651f7f7f1da33dff5a37af93238 (patch)
tree8e1256e31631285e86570b6af658abd065d50a75
parent43d9652891a389e45d148ba521f8f06ea64fcc19 (diff)
downloadchromium_src-4e40d83a011b8651f7f7f1da33dff5a37af93238.zip
chromium_src-4e40d83a011b8651f7f7f1da33dff5a37af93238.tar.gz
chromium_src-4e40d83a011b8651f7f7f1da33dff5a37af93238.tar.bz2
Changed the behavior of IsImeShowingPopup() to conservative.
When OmniboxView::IsImeShowingPopup() returns true, we're suppressing Omnibox suggest. The current implementation returns true even when IME popup is not open but IME has composition text. After some testing, it seems too aggressive to suppress Omnibox suggest. So I'd like to change IsImeShowingPopup() more conservative, so it returns false if unsure. BUG=245578 TEST=Test manually. Review URL: https://chromiumcodereview.appspot.com/17406007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207613 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view.cc7
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view.h4
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.cc3
3 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/ui/omnibox/omnibox_view.cc b/chrome/browser/ui/omnibox/omnibox_view.cc
index 96d73c5..50cc536 100644
--- a/chrome/browser/ui/omnibox/omnibox_view.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view.cc
@@ -128,9 +128,10 @@ void OmniboxView::CloseOmniboxPopup() {
}
bool OmniboxView::IsImeShowingPopup() const {
- // Since not all the IMEs/platforms support the detection of a IME's popup
- // window, falls back to IsImeComposing().
- return IsImeComposing();
+ // Default to claiming that the IME is not showing a popup, since hiding the
+ // omnibox dropdown is a bad user experience when we don't know for sure that
+ // we have to.
+ return false;
}
bool OmniboxView::IsIndicatingQueryRefinement() const {
diff --git a/chrome/browser/ui/omnibox/omnibox_view.h b/chrome/browser/ui/omnibox/omnibox_view.h
index 59f319b..972cac8 100644
--- a/chrome/browser/ui/omnibox/omnibox_view.h
+++ b/chrome/browser/ui/omnibox/omnibox_view.h
@@ -209,8 +209,8 @@ class OmniboxView {
// Returns true if the user is composing something in an IME.
virtual bool IsImeComposing() const = 0;
- // Returns true if an IME is showing a popup window, which may overlap
- // the omnibox's popup window.
+ // Returns true if we know for sure that an IME is showing a popup window,
+ // which may overlap the omnibox's popup window.
virtual bool IsImeShowingPopup() const;
// Returns true if the view is displaying UI that indicates that query
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 966a41c..fe31b9e 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -587,8 +587,7 @@ bool OmniboxViewViews::IsImeShowingPopup() const {
#else
// TODO(yukishiino): Implement detection of candidate windows on Windows.
// We can detect whether any candidate window is open or not on Windows.
- // Currently we simply fall back to IsImeComposing() as a second best way.
- return IsImeComposing();
+ return OmniboxView::IsImeShowingPopup();
#endif
}