Skip to content

Commit

Permalink
Uplift of #6592 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Sep 8, 2020
1 parent 7bf7451 commit 4381601
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarAppMenuManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarAppMenuManager.java
index cabff32bdae3..a74dd961aebb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarAppMenuManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarAppMenuManager.java
@@ -162,6 +162,7 @@ class ToolbarAppMenuManager implements AppMenuObserver {
mAppMenuHandler = appMenuHandler;
mAppMenuHandler.addObserver(this);
mAppMenuButtonHelper = mAppMenuHandler.createAppMenuButtonHelper();
+ mAppMenuButtonHelper.setMenuShowsFromBottom(mBottomToolbarEnabled);
mAppMenuButtonHelper.setOnAppMenuShownListener(() -> {
RecordUserAction.record("MobileToolbarShowMenu");
mToolbar.onMenuShown();
@@ -203,4 +204,5 @@ class ToolbarAppMenuManager implements AppMenuObserver {
mToolbar.removeAppMenuUpdateBadge(false);
}
}
+ private boolean mBottomToolbarEnabled = false; public void setBottomMenu(boolean enabled) {mBottomToolbarEnabled = enabled;if (mAppMenuButtonHelper != null) mAppMenuButtonHelper.setMenuShowsFromBottom(enabled); }
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
index 4c2c4fd10ba6c6f9981aa581b5630a38b4ee91f0..dbdfad69468c09d0f0adc4ca9b71e59244125666 100644
index 4c2c4fd10ba6..226caf69236b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
@@ -1253,6 +1253,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
Expand All @@ -10,3 +10,11 @@ index 4c2c4fd10ba6c6f9981aa581b5630a38b4ee91f0..dbdfad69468c09d0f0adc4ca9b71e592
}

private void updateReloadState(boolean tabCrashed) {
@@ -1354,6 +1355,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
mToolbar.onBottomToolbarVisibilityChanged(visible);
mBottomToolbarVisibilitySupplier.set(visible);
mBottomControlsCoordinator.setBottomControlsVisible(visible);
+ mAppMenuManager.setBottomMenu(isMenuFromBottom());
}

/**

0 comments on commit 4381601

Please sign in to comment.