CB-8715 Update comments to match whitelist code (close #166)

This commit is contained in:
Jason Chase 2015-03-24 23:35:22 -04:00 committed by Andrew Grieve
parent 32e84d2316
commit 38a8d7742e

View File

@ -308,18 +308,13 @@ public class PluginManager {
/** /**
* Called when the webview is going to request an external resource. * Called when the webview is going to request an external resource.
* *
* This delegates to the installed plugins, which must all return true for * This delegates to the installed plugins, and returns true/false for the
* this method to return true. * first plugin to provide a non-null result. If no plugins respond, then
* the default policy is applied.
* *
* @param url The URL that is being requested. * @param url The URL that is being requested.
* @return Tri-State: * @return Returns true to allow the resource to load,
* null: All plugins returned null (the default). This * false to block the resource.
* indicates that the default policy should be
* followed.
* true: All plugins returned true (allow the resource
* to load)
* false: At least one plugin returned false (block the
* resource)
*/ */
public boolean shouldAllowRequest(String url) { public boolean shouldAllowRequest(String url) {
for (PluginEntry entry : this.entryMap.values()) { for (PluginEntry entry : this.entryMap.values()) {
@ -351,18 +346,13 @@ public class PluginManager {
/** /**
* Called when the webview is going to change the URL of the loaded content. * Called when the webview is going to change the URL of the loaded content.
* *
* This delegates to the installed plugins, which must all return true for * This delegates to the installed plugins, and returns true/false for the
* this method to return true. A true result will allow the new page to load; * first plugin to provide a non-null result. If no plugins respond, then
* a false result will prevent the page from loading. * the default policy is applied.
* *
* @param url The URL that is being requested. * @param url The URL that is being requested.
* @return Tri-State: * @return Returns true to allow the navigation,
* null: All plugins returned null (the default). This * false to block the navigation.
* indicates that the default policy should be
* followed.
* true: All plugins returned true (allow the navigation)
* false: At least one plugin returned false (block the
* navigation)
*/ */
public boolean shouldAllowNavigation(String url) { public boolean shouldAllowNavigation(String url) {
for (PluginEntry entry : this.entryMap.values()) { for (PluginEntry entry : this.entryMap.values()) {
@ -402,19 +392,13 @@ public class PluginManager {
* Called when the webview is going not going to navigate, but may launch * Called when the webview is going not going to navigate, but may launch
* an Intent for an URL. * an Intent for an URL.
* *
* This delegates to the installed plugins, which must all return true for * This delegates to the installed plugins, and returns true/false for the
* this method to return true. A true result will allow the URL to launch; * first plugin to provide a non-null result. If no plugins respond, then
* a false result will prevent the URL from loading. * the default policy is applied.
* *
* @param url The URL that is being requested. * @param url The URL that is being requested.
* @return Tri-State: * @return Returns true to allow the URL to launch an intent,
* null: All plugins returned null (the default). This * false to block the intent.
* indicates that the default policy should be
* followed.
* true: All plugins returned true (allow the URL to
* launch an intent)
* false: At least one plugin returned false (block the
* intent)
*/ */
public Boolean shouldOpenExternalUrl(String url) { public Boolean shouldOpenExternalUrl(String url) {
for (PluginEntry entry : this.entryMap.values()) { for (PluginEntry entry : this.entryMap.values()) {