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

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

Issue 2141783002: Remove obsolete flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/toolbar/ToolbarPhone.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
index 535de6534da998ec36e33151d561b618be30bdd5..c4ce6e7f8201c7be0af11bf5b790e7430eaa2c03 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
@@ -322,12 +322,9 @@ public class ToolbarPhone extends ToolbarLayout
ApiCompatibilityUtils.setMarginEnd(
(MarginLayoutParams) mMenuButtonWrapper.getLayoutParams(),
getResources().getDimensionPixelSize(R.dimen.document_toolbar_menu_offset));
- }
-
- if (FeatureUtilities.isTabSwitchingEnabled(getContext())) {
- inflateTabSwitchingResources();
- } else {
hideTabSwitchingResources();
+ } else {
+ inflateTabSwitchingResources();
}
setWillNotDraw(false);
@@ -417,15 +414,7 @@ public class ToolbarPhone extends ToolbarLayout
super.onNativeLibraryReady();
getLocationBar().onNativeLibraryReady();
- if (FeatureUtilities.isTabSwitchingEnabledInDocumentMode(getContext())) {
- // We might have hidden some buttons at onFinishInflate() because it was called
- // before native library is ready and chrome switch can be correctly read.
- // Now recover those buttons. Since we want to show toolbar even before native
- // library is ready, and as tab switching is experimental, this is unavoidable.
- unhideTabSwitchingResources();
- inflateTabSwitchingResources();
- enableTabSwitchingResources();
- } else if (FeatureUtilities.isDocumentMode(getContext())) {
+ if (FeatureUtilities.isDocumentMode(getContext())) {
removeTabSwitchingResources();
} else { // non-document mode
enableTabSwitchingResources();

Powered by Google App Engine
This is Rietveld 408576698