| Index: chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsSettings.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsSettings.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..dfc82c18dfe43ce67a7aab0bfedc6e0645b4571e
|
| --- /dev/null
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsSettings.java
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2016 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.chrome.browser.instantapps;
|
| +
|
| +import org.chromium.content_public.browser.WebContents;
|
| +
|
| +/**
|
| + * A bridge class for retrieving Instant Apps-related settings.
|
| + */
|
| +public class InstantAppsSettings {
|
| +
|
| + /**
|
| + * Check whether the instant app at the given url should be opened by default.
|
| + */
|
| + public static boolean isInstantAppDefault(WebContents webContents, String url) {
|
| + return nativeGetInstantAppDefault(webContents, url);
|
| + }
|
| +
|
| + /**
|
| + * Remember that the instant app at the given url should be opened by default.
|
| + */
|
| + public static void setInstantAppDefault(WebContents webContents, String url) {
|
| + nativeSetInstantAppDefault(webContents, url);
|
| + }
|
| +
|
| + /**
|
| + * Check whether the banner promoting an instant app should be shown.
|
| + */
|
| + public static boolean shouldShowBanner(WebContents webContents, String url) {
|
| + return nativeShouldShowBanner(webContents, url);
|
| + }
|
| +
|
| + private static native boolean nativeGetInstantAppDefault(WebContents webContents, String url);
|
| + private static native void nativeSetInstantAppDefault(WebContents webContents, String url);
|
| + private static native boolean nativeShouldShowBanner(WebContents webContents, String url);
|
| +}
|
|
|