| Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java
|
| index 5655bfca23f2226fd0cdca979f892f20e80083aa..1ff8be9d7571ae6f79ae09078a64c118d71ec538 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModel.java
|
| @@ -5,6 +5,7 @@
|
| package org.chromium.chrome.browser.toolbar;
|
|
|
| import org.chromium.base.CalledByNative;
|
| +import org.chromium.chrome.browser.ui.toolbar.ToolbarModelSecurityLevel;
|
| import org.chromium.content_public.browser.WebContents;
|
|
|
| /**
|
| @@ -26,6 +27,19 @@ public class ToolbarModel {
|
| private long mNativeToolbarModelAndroid;
|
|
|
| /**
|
| + * Fetch the security level for a given web contents.
|
| + *
|
| + * @param webContents The web contents to get the security level for.
|
| + * @return The ToolbarModelSecurityLevel for the specified web contents.
|
| + *
|
| + * @see ToolbarModelSecurityLevel
|
| + */
|
| + public static int getSecurityLevelForWebContents(WebContents webContents) {
|
| + if (webContents == null) return ToolbarModelSecurityLevel.NONE;
|
| + return nativeGetSecurityLevelForWebContents(webContents);
|
| + }
|
| +
|
| + /**
|
| * Initialize the native counterpart of this model.
|
| * @param delegate The delegate that will be used by the model.
|
| */
|
| @@ -60,6 +74,8 @@ public class ToolbarModel {
|
| return nativeGetCorpusChipText(mNativeToolbarModelAndroid);
|
| }
|
|
|
| + private static native int nativeGetSecurityLevelForWebContents(WebContents webContents);
|
| +
|
| private native long nativeInit(ToolbarModelDelegate delegate);
|
| private native void nativeDestroy(long nativeToolbarModelAndroid);
|
| private native String nativeGetText(long nativeToolbarModelAndroid);
|
|
|