Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Unified Diff: chrome/browser/chromeos/setting_level_bubble.cc

Issue 7294024: Sound volume and bightness bubbles doesn't grab focus anymore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge branch 'trunk' of http://git.chromium.org/git/chromium into 16867 Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/setting_level_bubble.cc
diff --git a/chrome/browser/chromeos/setting_level_bubble.cc b/chrome/browser/chromeos/setting_level_bubble.cc
index d3f58e7858bd9991cfed49dd383aa7dfb3e1da00..fc0d55fc2d9ef1de8dd28dfb2bc1f45de1e3296b 100644
--- a/chrome/browser/chromeos/setting_level_bubble.cc
+++ b/chrome/browser/chromeos/setting_level_bubble.cc
@@ -112,6 +112,9 @@ void SettingLevelBubble::ShowBubble(int percent) {
const int x = view_size.width() / 2 +
kBubbleXRatio * (bounds.width() - view_size.width());
const int y = bounds.height() - view_size.height() / 2 - kBubbleBottomGap;
+
+ // ShowFocusless doesn't set ESC accelerator. The Esc key is handled in
+ // SystemKeyEventListener instead.
bubble_ = Bubble::ShowFocusless(widget, // parent
gfx::Rect(x, y, 0, 20),
BubbleBorder::FLOAT,
@@ -136,6 +139,10 @@ void SettingLevelBubble::HideBubble() {
bubble_->Close();
}
+bool SettingLevelBubble::IsShown() const {
+ return bubble_ != NULL;
+}
+
void SettingLevelBubble::UpdateWithoutShowingBubble(int percent) {
percent = LimitPercent(percent);

Powered by Google App Engine
This is Rietveld 408576698