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

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

Issue 1536623003: [Contextual Search] Keep Panel upon orientation change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Changwan's comments Created 5 years 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 46e722b1627c3f917417f14930b8e49b768ae57a..cf4409fb538e210d9b46eede93f352f366f2c116 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
@@ -503,6 +503,16 @@ public class ContextualSearchPanel extends OverlayPanel {
getPeekPromoControl().onUpdateFromExpandToMaximize(percentage);
}
+ @Override
+ protected void updatePanelForOrientationChange() {
+ // TODO(pedrosimonetti): find a better way of resizing the promo upon rotation.
+ // Destroys the Promo view so it can be properly resized. Once the Promo starts
+ // using the ViewResourceInflater, we could probably just call invalidate.
+ destroyPromoView();
+
+ super.updatePanelForOrientationChange();
+ }
+
// ============================================================================================
// ContextualSearchBarControl
// ============================================================================================

Powered by Google App Engine
This is Rietveld 408576698