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

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

Issue 572013002: Removing ContentViewCore dependencies from direct WebContents functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch and addressed review comments. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java
index e5dec6e1229467c84685c349b294258c785871e2..78535b42a125cc60fd3995f4cc75bc1aba8b00b3 100644
--- a/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java
+++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java
@@ -138,7 +138,7 @@ public class AccessibilityInjector extends WebContentsObserverAndroid {
if (mContentViewCore.isDeviceAccessibilityScriptInjectionEnabled() &&
js != null && mContentViewCore.isAlive()) {
addOrRemoveAccessibilityApisIfNecessary();
- mContentViewCore.evaluateJavaScript(js, null);
+ mContentViewCore.getWebContents().evaluateJavaScript(js, null);
mInjectedScriptEnabled = true;
mScriptInjected = true;
}
@@ -199,7 +199,7 @@ public class AccessibilityInjector extends WebContentsObserverAndroid {
if (mContentViewCore.isAlive()) {
String js = String.format(TOGGLE_CHROME_VOX_JAVASCRIPT, Boolean.toString(
mInjectedScriptEnabled));
- mContentViewCore.evaluateJavaScript(js, null);
+ mContentViewCore.getWebContents().evaluateJavaScript(js, null);
if (!mInjectedScriptEnabled) {
// Stop any TTS/Vibration right now.

Powered by Google App Engine
This is Rietveld 408576698