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

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

Issue 997733002: [Contextual Search] Prevents promo from being displayed incorrectly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Donn's comment 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelBase.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelBase.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelBase.java
index 91c3bd15963290015e1f15a1899d78ede66c7d96..e6deaa663411b57c2e7c4fc8c20733ac219fc227 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelBase.java
@@ -506,7 +506,6 @@ abstract class ContextualSearchPanelBase extends ContextualSearchPanelStateHandl
private float mPromoContentHeight;
private boolean mShouldHidePromoHeader;
- private static final float DEFAULT_PROMO_HEIGHT_DP = 250.f;
/**
* Sets the height of the promo content.
@@ -517,11 +516,10 @@ abstract class ContextualSearchPanelBase extends ContextualSearchPanelStateHandl
}
/**
- * Gets the height of the promo content.
+ * Gets the height of the promo content, or -1 if height has not been calculated.
*/
public float getPromoContentHeight() {
- return mPromoContentHeight > 0.0f
- ? mPromoContentHeight : DEFAULT_PROMO_HEIGHT_DP;
+ return mPromoContentHeight > 0.0f ? mPromoContentHeight : -1.f;
}
/**
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698