Index: ui/views/focus/focus_search_mac.mm |
diff --git a/ui/views/focus/focus_search_mac.mm b/ui/views/focus/focus_search_mac.mm |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6db369f07ffec1eaa6f43bfd9ac5ff6a15a596d6 |
--- /dev/null |
+++ b/ui/views/focus/focus_search_mac.mm |
@@ -0,0 +1,21 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/views/focus/focus_search.h" |
+ |
+#import <Cocoa/Cocoa.h> |
+ |
+#include "ui/views/view.h" |
+ |
+namespace views { |
+ |
+bool FocusSearch::IsFocusable(View* v) { |
+ // Use the accessibility mode, if full keyboard access is enabled on Mac. |
+ if (accessibility_mode_ || [NSApp isFullKeyboardAccessEnabled]) { |
+ return v && v->IsAccessibilityFocusable(); |
+ } |
+ return v && v->IsFocusable(); |
+} |
+ |
+} // namespace views |