summaryrefslogtreecommitdiffstats
path: root/ash/system/ime
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 13:49:42 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-14 13:49:42 +0000
commit3de6199352a89f6f7ec6ca05e81bd8fe43e28e38 (patch)
treeb42038eab311ce204fbbef652c76615ac055df66 /ash/system/ime
parent436cecb0cbadba803f25faaa191fe9bcea1e8c0b (diff)
downloadchromium_src-3de6199352a89f6f7ec6ca05e81bd8fe43e28e38.zip
chromium_src-3de6199352a89f6f7ec6ca05e81bd8fe43e28e38.tar.gz
chromium_src-3de6199352a89f6f7ec6ca05e81bd8fe43e28e38.tar.bz2
Only show caps lock and ime notifications once per boot
BUG=130966 TEST=Change the IME via alt+shift multiple times, and turn caps lock on and off multiple times. Make sure the messages only appear once. Review URL: https://chromiumcodereview.appspot.com/10540157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/ime')
-rw-r--r--ash/system/ime/tray_ime.cc11
-rw-r--r--ash/system/ime/tray_ime.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc
index b33462e..b301df7 100644
--- a/ash/system/ime/tray_ime.cc
+++ b/ash/system/ime/tray_ime.cc
@@ -219,7 +219,8 @@ TrayIME::TrayIME()
: tray_label_(NULL),
default_(NULL),
detailed_(NULL),
- notification_(NULL) {
+ notification_(NULL),
+ message_shown_(false) {
}
TrayIME::~TrayIME() {
@@ -308,11 +309,11 @@ void TrayIME::OnIMERefresh(bool show_message) {
if (detailed_)
detailed_->Update(list, property_list);
- if (show_message) {
- if (!notification_)
+ if (show_message && !message_shown_) {
+ if (!notification_) {
ShowNotificationView();
- else
- notification_->RestartAutoCloseTimer();
+ message_shown_ = true;
+ }
}
}
diff --git a/ash/system/ime/tray_ime.h b/ash/system/ime/tray_ime.h
index 5ec433a..f16396b 100644
--- a/ash/system/ime/tray_ime.h
+++ b/ash/system/ime/tray_ime.h
@@ -56,6 +56,8 @@ class TrayIME : public SystemTrayItem,
tray::IMEDetailedView* detailed_;
tray::IMENotificationView* notification_;
+ bool message_shown_;
+
DISALLOW_COPY_AND_ASSIGN(TrayIME);
};