summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Fischer <ntfschr@chromium.org>2018-03-23 20:53:53 +0000
committerNate Fischer <ntfschr@google.com>2018-03-23 16:00:40 -0700
commitda629b9f10fd0389cf816734c769c225f32f1b8a (patch)
tree357ae0670560b7e4990f7bfdec257f40838648a3
parente149215027e947e6655edb889f48990e90dce609 (diff)
downloadwebview_support_interfaces-da629b9f10fd0389cf816734c769c225f32f1b8a.tar.gz
AW: add WebViewClient boundary interface
No change to logic. This adds WebViewClientBoundaryInterface, which will be implemented by WebViewClientCompat on the support library side. These methods will be invoked from the support_library side in later CLs, as we implement each callback. Bug: 781764 Test: N/A Change-Id: I2ba052ff02076cec1c9d4e360aed322a63b511ef Reviewed-on: https://chromium-review.googlesource.com/974898 Reviewed-by: Richard Coles <torne@chromium.org> Reviewed-by: Gustav Sennton <gsennton@chromium.org> Commit-Queue: Nate Fischer <ntfschr@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#545575} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 2636fba313a00683509bc25cf4e79ad1f917ee49
-rw-r--r--BUILD.gn1
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java25
2 files changed, 26 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 9b36892..07c3cb6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -14,6 +14,7 @@ android_library("boundary_interface_java") {
"src/org/chromium/support_lib_boundary/SupportLibraryInfoBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java",
+ "src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java",
diff --git a/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java
new file mode 100644
index 0000000..2fccfe4
--- /dev/null
+++ b/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java
@@ -0,0 +1,25 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.support_lib_boundary;
+
+import android.webkit.WebResourceRequest;
+import android.webkit.WebResourceResponse;
+import android.webkit.WebView;
+
+import java.lang.reflect.InvocationHandler;
+
+/**
+ * Boundary interface for WebViewClientCompat.
+ */
+public interface WebViewClientBoundaryInterface {
+ void onPageCommitVisible(WebView view, String url);
+ void onReceivedError(WebView view, WebResourceRequest request,
+ /* WebResourceError */ InvocationHandler error);
+ void onReceivedHttpError(
+ WebView view, WebResourceRequest request, WebResourceResponse errorResponse);
+ void onSafeBrowsingHit(WebView view, WebResourceRequest request, int threatType,
+ /* SafeBrowsingResponse */ InvocationHandler callback);
+ boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request);
+}