OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.tab; | 5 package org.chromium.chrome.browser.tab; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.app.Application; | 9 import android.app.Application; |
10 import android.content.Context; | 10 import android.content.Context; |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 /** | 902 /** |
903 * @return The background color of the tab. | 903 * @return The background color of the tab. |
904 */ | 904 */ |
905 public int getBackgroundColor() { | 905 public int getBackgroundColor() { |
906 if (mNativePage != null) return mNativePage.getBackgroundColor(); | 906 if (mNativePage != null) return mNativePage.getBackgroundColor(); |
907 if (getWebContents() != null) return getWebContents().getBackgroundColor
(); | 907 if (getWebContents() != null) return getWebContents().getBackgroundColor
(); |
908 return Color.WHITE; | 908 return Color.WHITE; |
909 } | 909 } |
910 | 910 |
911 /** | 911 /** |
| 912 * @return Whether or not the tab can show the static layer. |
| 913 */ |
| 914 public boolean canUseStaticLayer() { |
| 915 if (getWebContents() != null) return getWebContents().canShowThumbnailPl
aceholder(); |
| 916 return true; |
| 917 } |
| 918 |
| 919 /** |
912 * @return The current theme color based on the value passed from the web co
ntents and the | 920 * @return The current theme color based on the value passed from the web co
ntents and the |
913 * security state. | 921 * security state. |
914 */ | 922 */ |
915 public int getThemeColor() { | 923 public int getThemeColor() { |
916 return mThemeColor; | 924 return mThemeColor; |
917 } | 925 } |
918 | 926 |
919 /** | 927 /** |
920 * Calculate the theme color based on if the page is native, the theme color
changed, etc. | 928 * Calculate the theme color based on if the page is native, the theme color
changed, etc. |
921 * @param didWebContentsThemeColorChange If the theme color of the web conte
nts is known to have | 929 * @param didWebContentsThemeColorChange If the theme color of the web conte
nts is known to have |
(...skipping 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3127 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); | 3135 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE
ditable); |
3128 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 3136 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
3129 InterceptNavigationDelegate delegate); | 3137 InterceptNavigationDelegate delegate); |
3130 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3138 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
3131 TabContentManager tabContentManager); | 3139 TabContentManager tabContentManager); |
3132 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 3140 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
3133 private native void nativeSetWebappManifestScope(long nativeTabAndroid, Stri
ng scope); | 3141 private native void nativeSetWebappManifestScope(long nativeTabAndroid, Stri
ng scope); |
3134 private native void nativeEnableEmbeddedMediaExperience(long nativeTabAndroi
d, boolean enabled); | 3142 private native void nativeEnableEmbeddedMediaExperience(long nativeTabAndroi
d, boolean enabled); |
3135 private native void nativeAttachDetachedTab(long nativeTabAndroid); | 3143 private native void nativeAttachDetachedTab(long nativeTabAndroid); |
3136 } | 3144 } |
OLD | NEW |