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

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

Issue 10963041: Revert "Revert 158067 - Remove native side of content_view_client" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add additional_input_paths as a variable and input to java.gypi Created 8 years, 3 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 9d9784d633f6982d0fa44f74aac7c185db7c4b98..457492a00345e2769920dd27a797f3c9ec59dc03 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
@@ -19,6 +19,7 @@ import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.JavascriptInterface;
+import org.chromium.content.browser.WebContentsObserverAndroid;
import org.json.JSONException;
import org.json.JSONObject;
@@ -33,7 +34,7 @@ import java.util.concurrent.atomic.AtomicInteger;
/**
* Responsible for accessibility injection and management of a {@link ContentViewCore}.
*/
-public class AccessibilityInjector {
+public class AccessibilityInjector extends WebContentsObserverAndroid {
// The ContentView this injector is responsible for managing.
protected ContentViewCore mContentViewCore;
@@ -93,6 +94,7 @@ public class AccessibilityInjector {
* @param view The ContentViewCore that this AccessibilityInjector manages.
*/
protected AccessibilityInjector(ContentViewCore view) {
+ super(view);
mContentViewCore = view;
}
@@ -185,10 +187,16 @@ public class AccessibilityInjector {
* accessibility script as not being injected. This way we can properly ignore incoming
* accessibility gesture events.
*/
- public void onPageLoadStarted() {
+ @Override
+ public void didStartLoading(String url) {
mScriptInjected = false;
}
+ @Override
+ public void didStopLoading(String url) {
+ injectAccessibilityScriptIntoPage();
+ }
+
/**
* Stop any notifications that are currently going on (e.g. Text-to-Speech).
*/

Powered by Google App Engine
This is Rietveld 408576698