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

Unified Diff: ui/views/focus/focus_search_mac.mm

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: 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

Powered by Google App Engine
This is Rietveld 408576698