| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.customtabs; | 5 package org.chromium.chrome.browser.customtabs; |
| 6 | 6 |
| 7 import android.app.PendingIntent; | 7 import android.app.PendingIntent; |
| 8 import android.content.Intent; | 8 import android.content.Intent; |
| 9 import android.content.SharedPreferences; | 9 import android.content.SharedPreferences; |
| 10 import android.graphics.Bitmap; | 10 import android.graphics.Bitmap; |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 public boolean shouldAllocateChildConnection() { | 266 public boolean shouldAllocateChildConnection() { |
| 267 return !mHasCreatedTabEarly && !mHasPrerender | 267 return !mHasCreatedTabEarly && !mHasPrerender |
| 268 && !WarmupManager.getInstance().hasSpareWebContents(); | 268 && !WarmupManager.getInstance().hasSpareWebContents(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 @Override | 271 @Override |
| 272 public void postInflationStartup() { | 272 public void postInflationStartup() { |
| 273 super.postInflationStartup(); | 273 super.postInflationStartup(); |
| 274 TabPersistencePolicy persistencePolicy = new CustomTabTabPersistencePoli
cy( | 274 TabPersistencePolicy persistencePolicy = new CustomTabTabPersistencePoli
cy( |
| 275 getTaskId(), getSavedInstanceState() != null); | 275 getTaskId(), getSavedInstanceState() != null); |
| 276 setTabModelSelector(new TabModelSelectorImpl( | 276 setTabModelSelector(new TabModelSelectorImpl(this, persistencePolicy, fa
lse)); |
| 277 this, persistencePolicy, getWindowAndroid(), false)); | |
| 278 setTabCreators( | 277 setTabCreators( |
| 279 new CustomTabCreator( | 278 new CustomTabCreator( |
| 280 this, getWindowAndroid(), false, | 279 this, getWindowAndroid(), false, |
| 281 mIntentDataProvider.shouldEnableUrlBarHiding()), | 280 mIntentDataProvider.shouldEnableUrlBarHiding()), |
| 282 new CustomTabCreator( | 281 new CustomTabCreator( |
| 283 this, getWindowAndroid(), true, | 282 this, getWindowAndroid(), true, |
| 284 mIntentDataProvider.shouldEnableUrlBarHiding())); | 283 mIntentDataProvider.shouldEnableUrlBarHiding())); |
| 285 | 284 |
| 286 getToolbarManager().setCloseButtonDrawable(mIntentDataProvider.getCloseB
uttonDrawable()); | 285 getToolbarManager().setCloseButtonDrawable(mIntentDataProvider.getCloseB
uttonDrawable()); |
| 287 getToolbarManager().setShowTitle(mIntentDataProvider.getTitleVisibilityS
tate() | 286 getToolbarManager().setShowTitle(mIntentDataProvider.getTitleVisibilityS
tate() |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 * overridden if the Data Reduction Proxy is using Lo-Fi previews. | 843 * overridden if the Data Reduction Proxy is using Lo-Fi previews. |
| 845 */ | 844 */ |
| 846 private String getUrlToLoad() { | 845 private String getUrlToLoad() { |
| 847 String url = IntentHandler.getUrlFromIntent(getIntent()); | 846 String url = IntentHandler.getUrlFromIntent(getIntent()); |
| 848 if (!TextUtils.isEmpty(url)) { | 847 if (!TextUtils.isEmpty(url)) { |
| 849 url = DataReductionProxySettings.getInstance().maybeRewriteWebliteUr
l(url); | 848 url = DataReductionProxySettings.getInstance().maybeRewriteWebliteUr
l(url); |
| 850 } | 849 } |
| 851 return url; | 850 return url; |
| 852 } | 851 } |
| 853 } | 852 } |
| OLD | NEW |