| Index: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
| index 5d6494848b3e4182ba86571a3344df92ff1f2fc1..cd6a933ded94bf65cbe791d928bd4653929eeafc 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
|
| @@ -491,12 +491,18 @@ public class Tab
|
| mWindowAndroid = window;
|
| mLaunchType = type;
|
| if (mLaunchType == TabLaunchType.FROM_DETACHED) mIsDetached = true;
|
| - Resources resources = mThemedApplicationContext.getResources();
|
| - mIdealFaviconSize = resources.getDimensionPixelSize(R.dimen.default_favicon_size);
|
| - mDefaultThemeColor = mIncognito
|
| - ? ApiCompatibilityUtils.getColor(resources, R.color.incognito_primary_color)
|
| - : ApiCompatibilityUtils.getColor(resources, R.color.default_primary_color);
|
| - mThemeColor = calculateThemeColor(false);
|
| + if (mThemedApplicationContext != null) {
|
| + Resources resources = mThemedApplicationContext.getResources();
|
| + mIdealFaviconSize = resources.getDimensionPixelSize(R.dimen.default_favicon_size);
|
| + mDefaultThemeColor = mIncognito
|
| + ? ApiCompatibilityUtils.getColor(resources, R.color.incognito_primary_color)
|
| + : ApiCompatibilityUtils.getColor(resources, R.color.default_primary_color);
|
| + mThemeColor = calculateThemeColor(false);
|
| + } else {
|
| + mIdealFaviconSize = 16;
|
| + mDefaultThemeColor = 0;
|
| + mThemeColor = mDefaultThemeColor;
|
| + }
|
|
|
| // Restore data from the TabState, if it existed.
|
| if (frozenState != null) {
|
| @@ -1288,7 +1294,6 @@ public class Tab
|
| } else {
|
| setContentViewCore(contentViewCore);
|
| }
|
| -
|
| mContentViewCore.addImeEventObserver(new ImeEventObserver() {
|
| @Override
|
| public void onImeEvent() {
|
| @@ -1308,7 +1313,6 @@ public class Tab
|
| if (!creatingWebContents && webContents.isLoadingToDifferentDocument()) {
|
| didStartPageLoad(webContents.getVisibleUrl(), false);
|
| }
|
| -
|
| getAppBannerManager().setIsEnabledForTab(mDelegateFactory.canShowAppBanners(this));
|
| } finally {
|
| if (mTimestampMillis == INVALID_TIMESTAMP) {
|
|
|