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; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 } | 1027 } |
1028 | 1028 |
1029 private void destroyNativePageInternal(NativePage nativePage) { | 1029 private void destroyNativePageInternal(NativePage nativePage) { |
1030 if (nativePage == null) return; | 1030 if (nativePage == null) return; |
1031 assert nativePage != mNativePage : "Attempting to destroy active page."; | 1031 assert nativePage != mNativePage : "Attempting to destroy active page."; |
1032 | 1032 |
1033 nativePage.destroy(); | 1033 nativePage.destroy(); |
1034 } | 1034 } |
1035 | 1035 |
1036 /** | 1036 /** |
| 1037 * Called when the background color for the content changes. |
| 1038 * @param color The current for the background. |
| 1039 */ |
| 1040 protected void onBackgroundColorChanged(int color) { |
| 1041 for (TabObserver observer : mObservers) observer.onBackgroundColorChange
d(this, color); |
| 1042 } |
| 1043 |
| 1044 /** |
1037 * Destroys the current {@link ContentViewCore}. | 1045 * Destroys the current {@link ContentViewCore}. |
1038 * @param deleteNativeWebContents Whether or not to delete the native WebCon
tents pointer. | 1046 * @param deleteNativeWebContents Whether or not to delete the native WebCon
tents pointer. |
1039 */ | 1047 */ |
1040 protected final void destroyContentViewCore(boolean deleteNativeWebContents)
{ | 1048 protected final void destroyContentViewCore(boolean deleteNativeWebContents)
{ |
1041 if (mContentViewCore == null) return; | 1049 if (mContentViewCore == null) return; |
1042 | 1050 |
1043 destroyContentViewCoreInternal(mContentViewCore); | 1051 destroyContentViewCoreInternal(mContentViewCore); |
1044 | 1052 |
1045 if (mInfoBarContainer != null && mInfoBarContainer.getParent() != null)
{ | 1053 if (mInfoBarContainer != null && mInfoBarContainer.getParent() != null)
{ |
1046 mInfoBarContainer.removeFromParentView(); | 1054 mInfoBarContainer.removeFromParentView(); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1297 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); | 1305 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); |
1298 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, | 1306 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, |
1299 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, | 1307 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, |
1300 boolean isRendererInitiated); | 1308 boolean isRendererInitiated); |
1301 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, | 1309 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, |
1302 String title); | 1310 String title); |
1303 private native boolean nativePrint(long nativeTabAndroid); | 1311 private native boolean nativePrint(long nativeTabAndroid); |
1304 private native Bitmap nativeGetDefaultFavicon(long nativeTabAndroid); | 1312 private native Bitmap nativeGetDefaultFavicon(long nativeTabAndroid); |
1305 private native void nativeCreateHistoricalTab(long nativeTabAndroid); | 1313 private native void nativeCreateHistoricalTab(long nativeTabAndroid); |
1306 } | 1314 } |
OLD | NEW |