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

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

Issue 481803004: Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments and rebased the patch. Created 6 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 de4db4aff4afd4b8b61b03c3fc27e37f40635c6d..e5dec6e1229467c84685c349b294258c785871e2 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
@@ -305,11 +305,13 @@ public class AccessibilityInjector extends WebContentsObserverAndroid {
}
private int getAxsUrlParameterValue() {
- if (mContentViewCore.getUrl() == null) return ACCESSIBILITY_SCRIPT_INJECTION_UNDEFINED;
+ if (mContentViewCore.getWebContents().getUrl() == null) {
+ return ACCESSIBILITY_SCRIPT_INJECTION_UNDEFINED;
+ }
try {
- List<NameValuePair> params = URLEncodedUtils.parse(new URI(mContentViewCore.getUrl()),
- null);
+ List<NameValuePair> params = URLEncodedUtils.parse(
+ new URI(mContentViewCore.getWebContents().getUrl()), null);
for (NameValuePair param : params) {
if ("axs".equals(param.getName())) {
@@ -317,8 +319,11 @@ public class AccessibilityInjector extends WebContentsObserverAndroid {
}
}
} catch (URISyntaxException ex) {
+ // Intentional no-op.
} catch (NumberFormatException ex) {
+ // Intentional no-op.
} catch (IllegalArgumentException ex) {
+ // Intentional no-op.
}
return ACCESSIBILITY_SCRIPT_INJECTION_UNDEFINED;

Powered by Google App Engine
This is Rietveld 408576698