Index: ui/views/controls/button/button.cc |
diff --git a/ui/views/controls/button/button.cc b/ui/views/controls/button/button.cc |
index 9f7e5e283c2542c0a24d6d96e2cc6bce7791add6..65ce865d977e76a97e1bec4ebc4f39d5ea579f2c 100644 |
--- a/ui/views/controls/button/button.cc |
+++ b/ui/views/controls/button/button.cc |
@@ -24,6 +24,16 @@ Button::ButtonState Button::GetButtonStateFrom(ui::NativeTheme::State state) { |
return Button::STATE_NORMAL; |
} |
+// static |
+void Button::ConfigureDefaultFocus(Button* button) { |
+#if defined(OS_MACOSX) |
+ // On Mac, buttons are focusable only in full keyboard access mode. |
+ button->SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY); |
+#else |
+ button->SetFocusBehavior(FocusBehavior::ALWAYS); |
+#endif |
+} |
+ |
//////////////////////////////////////////////////////////////////////////////// |
// Button, public: |