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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 490333002: Only set accessibility focus on page load for browser tabs, not web views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 6 years, 4 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: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index aebda91e321f592e556799e3420e4d064a3ef890..c288b189f539a3a2169f35f41ff2dbec61a651b2 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -297,6 +297,12 @@ public class ContentViewCore
// Accessibility touch exploration state.
private boolean mTouchExplorationEnabled;
+ // Whether accessibility focus should be set to the page when it finishes loading.
+ // This only applies if an accessibility service like TalkBack is running.
+ // This is desirable behavior for a browser window, but not for an embedded
+ // WebView.
+ private boolean mShouldSetAccessibilityFocusOnPageLoad;
+
// Allows us to dynamically respond when the accessibility script injection flag changes.
private ContentObserver mAccessibilityScriptInjectionObserver;
@@ -2893,6 +2899,23 @@ public class ContentViewCore
}
/**
+ * Return whether or not we should set accessibility focus on page load.
+ */
+ public boolean shouldSetAccessibilityFocusOnPageLoad() {
+ return mShouldSetAccessibilityFocusOnPageLoad;
+ }
+
+ /**
+ * Return whether or not we should set accessibility focus on page load.
hush (inactive) 2014/08/27 18:35:37 sorry for the commenting on this after it is commi
+ * This only applies if an accessibility service like TalkBack is running.
+ * This is desirable behavior for a browser window, but not for an embedded
+ * WebView.
+ */
+ public void setShouldSetAccessibilityFocusOnPageLoad(boolean on) {
+ mShouldSetAccessibilityFocusOnPageLoad = on;
+ }
+
+ /**
* Inform WebKit that Fullscreen mode has been exited by the user.
*/
public void exitFullscreen() {

Powered by Google App Engine
This is Rietveld 408576698