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

Unified Diff: ui/views/controls/button/custom_button.h

Issue 1437523005: Custom buttons should only handle accelerators when focused. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase & style Created 5 years, 1 month 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
« no previous file with comments | « no previous file | ui/views/controls/button/custom_button.cc » ('j') | ui/views/controls/button/custom_button.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/custom_button.h
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index 713cdeaa80a44297c604e2b94dc4264fade7cc59..869bcd77af5dac05115312e726c984cf58aac1cf 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -135,6 +135,11 @@ class VIEWS_EXPORT CustomButton : public Button,
scoped_ptr<gfx::ThrobAnimation> hover_animation_;
private:
+ // Returns true if this is not a top level widget. Virtual for tests.
+ virtual bool IsChildWidget() const;
+ // Returns true if the focus is not in a top level widget. Virtual for tests.
+ virtual bool FocusInChildWidget() const;
+
// Should we animate when the state changes? Defaults to true.
bool animate_on_state_change_;
« no previous file with comments | « no previous file | ui/views/controls/button/custom_button.cc » ('j') | ui/views/controls/button/custom_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698