summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustav Sennton <gsennton@google.com>2018-02-09 15:10:33 +0000
committerGustav Sennton <gsennton@google.com>2018-02-12 11:29:26 +0000
commit32e305a583aa99c98eb2d4f8cb0a4a7e3631f13c (patch)
tree5b1b5cf06affe674abc354076a7440346f2575c1
parent2dcef84ac923ce1a9c064676f52d74ca8121f2eb (diff)
downloadwebview_support_interfaces-32e305a583aa99c98eb2d4f8cb0a4a7e3631f13c.tar.gz
Rename boundary interfaces, and pass WebView to WVFP.createWebView.
Suffix all boundary interfaces with 'BoundaryInterfaces'. Pass WebView instead of an Object representing a WebViewProvider to the method for creating support library WebViewProviders - the chromium-side is compiled against the system sdk so we can fetch the corresponding WebViewProvider from the given WebView from there. Bug: 788177 Change-Id: I51d71ecab79624902031e5fdab247f7d903ae335 Reviewed-on: https://chromium-review.googlesource.com/911088 Reviewed-by: Richard Coles <torne@chromium.org> Commit-Queue: Gustav Sennton <gsennton@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#535714} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 4235bf67f2a85c2e044b22b4cf37e2243c1912ac
-rw-r--r--BUILD.gn8
-rw-r--r--src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java (renamed from src/org/chromium/support_lib_boundary/VisualStateCallbackInterface.java)4
-rw-r--r--src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java (renamed from src/org/chromium/support_lib_boundary/WebSettingsInterface.java)4
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProvider.java16
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java14
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProviderFactory.java16
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java15
7 files changed, 37 insertions, 40 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 66f2fee..a69d3d5 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -7,10 +7,10 @@ import("//build/config/android/rules.gni")
android_library("boundary_interface_java") {
java_files = [
- "src/org/chromium/support_lib_boundary/VisualStateCallbackInterface.java",
- "src/org/chromium/support_lib_boundary/WebSettingsInterface.java",
- "src/org/chromium/support_lib_boundary/WebViewProvider.java",
- "src/org/chromium/support_lib_boundary/WebViewProviderFactory.java",
+ "src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java",
+ "src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java",
+ "src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java",
+ "src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java",
]
# We can't use ANY deps here, the support library should be able to build
diff --git a/src/org/chromium/support_lib_boundary/VisualStateCallbackInterface.java b/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java
index 1511191..6fd25c5 100644
--- a/src/org/chromium/support_lib_boundary/VisualStateCallbackInterface.java
+++ b/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,4 +6,4 @@ package org.chromium.support_lib_boundary;
/**
*/
-public interface VisualStateCallbackInterface { void onComplete(long requestId); }
+public interface VisualStateCallbackBoundaryInterface { void onComplete(long requestId); }
diff --git a/src/org/chromium/support_lib_boundary/WebSettingsInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
index c138afb..4ee8d6b 100644
--- a/src/org/chromium/support_lib_boundary/WebSettingsInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
+// 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.
@@ -10,7 +10,7 @@ package org.chromium.support_lib_boundary;
// against.
/**
*/
-public interface WebSettingsInterface {
+public interface WebSettingsBoundaryInterface {
void setSafeBrowsingEnabled(boolean enabled);
boolean getSafeBrowsingEnabled();
}
diff --git a/src/org/chromium/support_lib_boundary/WebViewProvider.java b/src/org/chromium/support_lib_boundary/WebViewProvider.java
deleted file mode 100644
index 977902d..0000000
--- a/src/org/chromium/support_lib_boundary/WebViewProvider.java
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 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 java.lang.reflect.InvocationHandler;
-
-/**
- */
-public interface WebViewProvider {
- void insertVisualStateCallback(long requestId,
- InvocationHandler
- /* org.chromium.sup_lib_boundary.VisualStateCallback */ callbackInvoHandler);
- InvocationHandler /* org.chromium.sup_lib_boundary.WebSettingsInterface */ getSettings();
-}
diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java
new file mode 100644
index 0000000..52524ed
--- /dev/null
+++ b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java
@@ -0,0 +1,14 @@
+// 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 java.lang.reflect.InvocationHandler;
+
+/**
+ */
+public interface WebViewProviderBoundaryInterface {
+ void insertVisualStateCallback(long requestId,
+ /* VisualStateCallback */ InvocationHandler callback);
+}
diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderFactory.java b/src/org/chromium/support_lib_boundary/WebViewProviderFactory.java
deleted file mode 100644
index 734e281..0000000
--- a/src/org/chromium/support_lib_boundary/WebViewProviderFactory.java
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2017 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 java.lang.reflect.InvocationHandler;
-
-/**
- */
-public interface WebViewProviderFactory {
- // android.webkit.WebViewProvider is in the SystemApi, not public, so we pass it as an Object
- // here.
- InvocationHandler /* org.chromium.sup_lib_boundary.WebViewProvider */ createWebView(
- Object /* android.webkit.WebViewProvider */ webviewProvider);
-}
diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
new file mode 100644
index 0000000..47ff918
--- /dev/null
+++ b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
@@ -0,0 +1,15 @@
+// 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.WebView;
+
+import java.lang.reflect.InvocationHandler;
+
+/**
+ */
+public interface WebViewProviderFactoryBoundaryInterface {
+ /* SupportLibraryWebViewProvider */ InvocationHandler createWebView(WebView webview);
+}