Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initializes bottom menu toolbar variable on Android #6592

Merged
merged 1 commit into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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());
}

/**