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

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

Issue 24559002: [Android] When toggling AX script inject, also set native AX state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.app.SearchManager; 8 import android.app.SearchManager;
9 import android.content.ContentResolver; 9 import android.content.ContentResolver;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 2965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 2976
2977 /** 2977 /**
2978 * Turns browser accessibility on or off. 2978 * Turns browser accessibility on or off.
2979 * If |state| is |false|, this turns off both native and injected accessibil ity. 2979 * If |state| is |false|, this turns off both native and injected accessibil ity.
2980 * Otherwise, if accessibility script injection is enabled, this will enable the injected 2980 * Otherwise, if accessibility script injection is enabled, this will enable the injected
2981 * accessibility scripts. Native accessibility is enabled on demand. 2981 * accessibility scripts. Native accessibility is enabled on demand.
2982 */ 2982 */
2983 public void setAccessibilityState(boolean state) { 2983 public void setAccessibilityState(boolean state) {
2984 if (!state) { 2984 if (!state) {
2985 setInjectedAccessibility(false); 2985 setInjectedAccessibility(false);
2986 mNativeAccessibilityAllowed = false;
2986 return; 2987 return;
2987 } 2988 }
2988 2989
2989 if (isDeviceAccessibilityScriptInjectionEnabled()) { 2990 if (isDeviceAccessibilityScriptInjectionEnabled()) {
2990 setInjectedAccessibility(true); 2991 setInjectedAccessibility(true);
2992 mNativeAccessibilityAllowed = false;
2991 return; 2993 return;
2992 } 2994 }
2993 2995
2994 mNativeAccessibilityAllowed = true; 2996 mNativeAccessibilityAllowed = true;
joth 2013/09/25 11:41:28 bool use_chromevox = isDeviceAccessibilityScriptIn
2995 } 2997 }
2996 2998
2997 /** 2999 /**
2998 * Enable or disable injected accessibility features 3000 * Enable or disable injected accessibility features
2999 */ 3001 */
3000 public void setInjectedAccessibility(boolean enabled) { 3002 public void setInjectedAccessibility(boolean enabled) {
3001 mAccessibilityInjector.addOrRemoveAccessibilityApisIfNecessary(); 3003 mAccessibilityInjector.addOrRemoveAccessibilityApisIfNecessary();
3002 mAccessibilityInjector.setScriptEnabled(enabled); 3004 mAccessibilityInjector.setScriptEnabled(enabled);
3003 } 3005 }
3004 3006
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
3295 3297
3296 private native void nativeAttachExternalVideoSurface( 3298 private native void nativeAttachExternalVideoSurface(
3297 int nativeContentViewCoreImpl, int playerId, Surface surface); 3299 int nativeContentViewCoreImpl, int playerId, Surface surface);
3298 3300
3299 private native void nativeDetachExternalVideoSurface( 3301 private native void nativeDetachExternalVideoSurface(
3300 int nativeContentViewCoreImpl, int playerId); 3302 int nativeContentViewCoreImpl, int playerId);
3301 3303
3302 private native void nativeSetAccessibilityEnabled( 3304 private native void nativeSetAccessibilityEnabled(
3303 int nativeContentViewCoreImpl, boolean enabled); 3305 int nativeContentViewCoreImpl, boolean enabled);
3304 } 3306 }
OLDNEW
« 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