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

Unified Diff: chrome/browser/ui/views/bubble/bubble.h

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/ui/views/bubble/bubble.h
diff --git a/chrome/browser/ui/views/bubble/bubble.h b/chrome/browser/ui/views/bubble/bubble.h
index 9c2735c1e4175041ceef74cc317b61bb7abf7db3..c79430dfbc9921e9b4e7e4378b2c0cdae8e96793 100644
--- a/chrome/browser/ui/views/bubble/bubble.h
+++ b/chrome/browser/ui/views/bubble/bubble.h
@@ -98,11 +98,12 @@ class Bubble
BubbleDelegate* delegate);
#if defined(OS_CHROMEOS)
- // Shows the Bubble without grabbing the focus. Others are the same as
- // above. TYPE_POPUP widget is used to achieve the focusless effect.
- // If |show_while_screen_is_locked| is true, a property is set telling the
- // window manager to continue showing the bubble even while the screen is
- // locked.
+ // Shows the Bubble without grabbing the focus. Doesn't set the Escape
+ // accelerator so user code is responsible for closing the bubble on pressing
+ // the Esc key. Others are the same as above. TYPE_POPUP widget is used
+ // to achieve the focusless effect. If |show_while_screen_is_locked| is true,
+ // a property is set telling the window manager to continue showing the bubble
+ // even while the screen is locked.
static Bubble* ShowFocusless(views::Widget* parent,
const gfx::Rect& position_relative_to,
BubbleBorder::ArrowLocation arrow_location,
@@ -190,6 +191,9 @@ class Bubble
// Animates to a visible/hidden state (visible if |fade_in| is true).
void Fade(bool fade_in);
+ void RegisterEscapeAccelerator();
+ void UnregisterEscapeAccelerator();
+
// Overridden from AcceleratorTarget:
virtual bool AcceleratorPressed(const views::Accelerator& accelerator);
@@ -220,6 +224,8 @@ class Bubble
views::View* contents_;
+ bool accelerator_registered_;
+
DISALLOW_COPY_AND_ASSIGN(Bubble);
};

Powered by Google App Engine
This is Rietveld 408576698