diff options
author | Laís Minchillo <laisminchillo@chromium.org> | 2018-12-19 19:24:07 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2018-12-19 19:24:07 +0000 |
commit | 92724acaa11f6c2e8f0ca523f5480cee48bb070a (patch) | |
tree | d3774247c5b3ad67bbf44e1649a783b4af1d734c /src/org | |
parent | 7fb2d465e0fdfa092bf5dd7302869c18b5636722 (diff) | |
download | webview_support_interfaces-92724acaa11f6c2e8f0ca523f5480cee48bb070a.tar.gz |
[aw] Update proxy API to receive proxy rules
Update setProxyOverride method to receive an array of proxy rules
(schemeFilter, proxyUrl) and an array of bypass rules.
Move proxy override methods from AwContentsStatics to AwProxyController
as they are no longer static.
Bug: 906637
Change-Id: I3551001a2574204988aad9663ff5ff248494cc89
Reviewed-on: https://chromium-review.googlesource.com/c/1313049
Reviewed-by: Tobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: Eric Roman <eroman@chromium.org>
Commit-Queue: Laís Minchillo <laisminchillo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#617905}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bc08f72666434525612301f7b3638f4084ad10c6
Diffstat (limited to 'src/org')
4 files changed, 20 insertions, 5 deletions
diff --git a/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java new file mode 100644 index 0000000..f9abc59 --- /dev/null +++ b/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java @@ -0,0 +1,16 @@ +// 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.util.concurrent.Executor; + +/** + * Boundary interface for ProxyController. + */ +public interface ProxyControllerBoundaryInterface { + void setProxyOverride( + String[][] proxyRules, String[] bypassRules, Runnable listener, Executor executor); + void clearProxyOverride(Runnable listener, Executor executor); +} diff --git a/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java index 5511b39..d60a60d 100644 --- a/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java @@ -17,6 +17,4 @@ public interface StaticsBoundaryInterface { void initSafeBrowsing(Context context, ValueCallback<Boolean> callback); void setSafeBrowsingWhitelist(List<String> hosts, ValueCallback<Boolean> callback); Uri getSafeBrowsingPrivacyPolicyUrl(); - void setProxyOverride(String host, int port, String[] exclusionList, Runnable callback); - void clearProxyOverride(Runnable callback); } diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java index b971ed6..15db689 100644 --- a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java @@ -17,4 +17,5 @@ public interface WebViewProviderFactoryBoundaryInterface { String[] getSupportedFeatures(); /* SupportLibraryServiceWorkerController */ InvocationHandler getServiceWorkerController(); /* SupportLibraryTracingController */ InvocationHandler getTracingController(); + /* SupportLibraryProxyController */ InvocationHandler getProxyController(); } diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 287bcc0..cf5dbf1 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -128,9 +128,9 @@ public class Features { // WebViewCompat.getWebChromeClient public static final String GET_WEB_CHROME_CLIENT = "GET_WEB_CHROME_CLIENT"; - // WebViewCompat.setProxyOverride - // WebViewCompat.clearProxyOverride - public static final String PROXY_OVERRIDE = "PROXY_OVERRIDE:2"; + // ProxyController.setProxyOverride + // ProxyController.clearProxyOverride + public static final String PROXY_OVERRIDE = "PROXY_OVERRIDE:3" + DEV_SUFFIX; // WebViewCompat.getWebViewRenderer public static final String GET_WEB_VIEW_RENDERER = "GET_WEB_VIEW_RENDERER"; |