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

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

Issue 1050163004: [Contextual Search] Implements Opt-out promo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring Created 5 years, 9 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/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 45fe265322f8b77cc95a55aa9716ff29855ddea7..4deff915d73e31ee210390391f6bcbe74f2329b7 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
@@ -9,6 +9,7 @@ import android.os.Handler;
import org.chromium.chrome.browser.compositor.layouts.LayoutUpdateHost;
import org.chromium.chrome.browser.contextualsearch.ContextualSearchManagementDelegate;
+import org.chromium.chrome.browser.widget.ContextualSearchControl;
/**
* Controls the Contextual Search Panel.
@@ -244,7 +245,7 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
* @return Whether the given |y| coordinate is inside the Search Bar area.
*/
public boolean isYCoordinateInsideSearchBar(float y) {
- return !isYCoordinateInsideBasePage(y) && !isYCoordinateInsideSearchContentView(y);
+ return y >= getOffsetY() && y <= (getOffsetY() + getSearchBarHeight());
}
/**
@@ -260,7 +261,7 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
* @return The vertical offset of the Search Content View in dp.
*/
public float getSearchContentViewOffsetY() {
- return getOffsetY() + getSearchBarHeight();
+ return getOffsetY() + getSearchBarHeight() + getPromoHeight();
}
/**
@@ -452,6 +453,13 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
@Override
public void onSearchResultsLoaded(boolean wasPrefetch) {
+ // NOTE(pedrosimonetti): exposing superclass method to the interface.
super.onSearchResultsLoaded(wasPrefetch);
}
+
+ @Override
+ public ContextualSearchControl getContextualSearchControl() {
+ // NOTE(pedrosimonetti): exposing superclass method to the interface.
+ return super.getContextualSearchControl();
+ }
}

Powered by Google App Engine
This is Rietveld 408576698