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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java

Issue 1432613002: Generalize ContextualSearchEdgeSwipeHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@panel-manager
Patch Set: rebase Created 5 years, 1 month 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/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
index 299728c1b025bcef7925dddd7a087aa2256a326e..961c20ef95cf8998c64b09cf4ae29f42c16e2cfe 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
@@ -297,6 +297,18 @@ public class ContextualSearchPanel extends OverlayPanel {
@Override
public boolean onInterceptBarClick() {
+ return onInterceptOpeningPanel();
+ }
+
+ @Override
+ public boolean onInterceptBarSwipe() {
+ return onInterceptOpeningPanel();
+ }
+
+ /**
+ * @return True if the event on the bar was intercepted.
+ */
+ private boolean onInterceptOpeningPanel() {
if (mManagementDelegate.isRunningInCompatibilityMode()) {
mManagementDelegate.openResolvedSearchUrlInNewTab();
return true;
@@ -320,6 +332,11 @@ public class ContextualSearchPanel extends OverlayPanel {
return false;
}
+ @Override
+ public boolean supportsContextualSearchLayout() {
+ return mManagementDelegate != null && !mManagementDelegate.isRunningInCompatibilityMode();
+ }
+
// ============================================================================================
// Animation Handling
// ============================================================================================

Powered by Google App Engine
This is Rietveld 408576698