Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(909)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java

Issue 2891343003: [Home] Make the new NTP over the tab switcher design the default (Closed)
Patch Set: [Home] Make the new NTP over the tab switcher design the default Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
index a308c9449942bf753bb2e2d85ed9a5bf131f058f..d9a13f80cb0b66e99e3a85839dfd477fbb801249 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -250,9 +250,6 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
*/
private boolean mCreatedTabOnStartup;
- /** Whether new tabs should be created using the {@link BottomSheet}. */
- private Boolean mShouldCreateNewTabsUsingBottomSheet;
-
// Whether or not chrome was launched with an intent to open a tab.
private boolean mIntentWithEffect;
@@ -322,7 +319,7 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
@Override
public Tab launchUrl(
String url, TabModel.TabLaunchType type, Intent intent, long intentTimestamp) {
- if (shouldCreateNewTabsUsingBottomSheet() && NewTabPage.isNTPUrl(url)) {
+ if (getBottomSheet() != null && NewTabPage.isNTPUrl(url)) {
getBottomSheet().displayNewTabUi(mIsIncognito);
return null;
}
@@ -955,7 +952,7 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
private void createInitialTab() {
String url = HomepageManager.getHomepageUri(getApplicationContext());
if (TextUtils.isEmpty(url)) {
- if (shouldCreateNewTabsUsingBottomSheet()) {
+ if (getBottomSheet() != null) {
mCreateInitialTabDuringUiInit = true;
return;
}
@@ -2098,13 +2095,4 @@ public class ChromeTabbedActivity extends ChromeActivity implements OverviewMode
public boolean supportsFullscreenActivity() {
return true;
}
-
- private boolean shouldCreateNewTabsUsingBottomSheet() {
- if (mShouldCreateNewTabsUsingBottomSheet == null) {
- mShouldCreateNewTabsUsingBottomSheet = getBottomSheet() != null
- && ChromeFeatureList.isEnabled(ChromeFeatureList.CHROME_HOME_NTP_REDESIGN);
- }
-
- return mShouldCreateNewTabsUsingBottomSheet;
- }
}

Powered by Google App Engine
This is Rietveld 408576698