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

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

Issue 1253573002: Handle incognito mode for accessibility tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assist-1
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 974f69353e715413a06e07cd2a46528d41c74b49..6903b9b1d87b00670828b9d377b69d6bcf613a64 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
@@ -2944,6 +2944,12 @@ public class ContentViewCore implements
// @TargetApi(Build.VERSION_CODES.M) TODO(sgurun) add method document once API is public
// crbug/512264
public void onProvideVirtualStructure(final ViewStructure structure) {
+ // Do not collect accessibility tree in incognito mode
+ if (getWebContents().isIncognito()) {
+ structure.setChildCount(0);
+ return;
+ }
+
structure.setChildCount(1);
final ViewStructure viewRoot = structure.asyncNewChild(0);
getWebContents().requestAccessibilitySnapshot(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698