summaryrefslogtreecommitdiffstats
path: root/ash/ime
diff options
context:
space:
mode:
authorvasilii@chromium.org <vasilii@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 21:21:48 +0000
committervasilii@chromium.org <vasilii@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 21:21:48 +0000
commit2fe3a1258097951bc015142effb37c38cdc65567 (patch)
treea2676bd36cb8fd5c5cc1db39947262762f52d09e /ash/ime
parent401c9dc414cd708d53ced5d884f8eb3a8b4bcbe5 (diff)
downloadchromium_src-2fe3a1258097951bc015142effb37c38cdc65567.zip
chromium_src-2fe3a1258097951bc015142effb37c38cdc65567.tar.gz
chromium_src-2fe3a1258097951bc015142effb37c38cdc65567.tar.bz2
Refactor BubbleDelegateView::use_focuseless().
It's confusing because it prevents the bubble activation. As a side effect on Windows the bubble doesn't get LBUTTON_DOWN messages. The reason for that is in HWNDMessageHandler::OnMouseActivate(). It asks the bubble if it can be activated. It answers "no" due to implementation in BubbleDelegateView::CanActivate(). Windows gets MA_NOACTIVATEANDEAT and MouseDown event isn't dispatched. This is definitely unexpected. The bubbles which indeed always inactive should use set_can_activate(false) at construction time. The bubbles which can be active but created without focus by default should use ShowInactive() instead. BUG=392734 Review URL: https://codereview.chromium.org/413433002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/ime')
-rw-r--r--ash/ime/candidate_window_view.cc2
-rw-r--r--ash/ime/infolist_window.cc2
-rw-r--r--ash/ime/mode_indicator_view.cc2
3 files changed, 3 insertions, 3 deletions
diff --git a/ash/ime/candidate_window_view.cc b/ash/ime/candidate_window_view.cc
index c759390..7cd7107 100644
--- a/ash/ime/candidate_window_view.cc
+++ b/ash/ime/candidate_window_view.cc
@@ -148,7 +148,7 @@ CandidateWindowView::CandidateWindowView(gfx::NativeView parent)
should_show_at_composition_head_(false),
should_show_upper_side_(false),
was_candidate_window_open_(false) {
- set_use_focusless(true);
+ set_can_activate(false);
set_parent_window(parent);
set_margins(gfx::Insets());
diff --git a/ash/ime/infolist_window.cc b/ash/ime/infolist_window.cc
index d29ed2a..f529948 100644
--- a/ash/ime/infolist_window.cc
+++ b/ash/ime/infolist_window.cc
@@ -172,7 +172,7 @@ InfolistWindow::InfolistWindow(views::View* candidate_window,
title_font_list_(gfx::Font(kJapaneseFontName, kFontSizeDelta + 15)),
description_font_list_(gfx::Font(kJapaneseFontName,
kFontSizeDelta + 11)) {
- set_use_focusless(true);
+ set_can_activate(false);
set_accept_events(false);
set_margins(gfx::Insets());
diff --git a/ash/ime/mode_indicator_view.cc b/ash/ime/mode_indicator_view.cc
index 117d6c4..e0c6f2f 100644
--- a/ash/ime/mode_indicator_view.cc
+++ b/ash/ime/mode_indicator_view.cc
@@ -48,7 +48,7 @@ ModeIndicatorView::ModeIndicatorView(gfx::NativeView parent,
const base::string16& label)
: cursor_bounds_(cursor_bounds),
label_view_(new views::Label(label)) {
- set_use_focusless(true);
+ set_can_activate(false);
set_accept_events(false);
set_parent_window(parent);
set_shadow(views::BubbleBorder::NO_SHADOW);