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

Issue 1403813003: [Contextual Search] Fixes ContentView regressions. (Closed)

Created:
5 years, 2 months ago by pedro (no code reviews)
Modified:
5 years, 2 months ago
CC:
chromium-reviews, mdjones
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Contextual Search] Fixes ContentView regressions. This CL fixes important regressions in the way ContentViews are rendered in Contextual Search. All loaded searches were being made visible, even when the user didn't interact with the Panel. Now there's no way to control the visibility of the Content from outside its class. Instead, consumers should call acknowledgeIntentToShowContent() to signal that there's an intent to show the Content, but only the Content will actually control its visibility, which makes the code more robust. Also, the OverlayPanelContent class wasn't properly clearing its internal states, which was causing other bugs. These bugs happened, in part, because we are exposing methods to create and destroy the ContentView. Also, tests were not creating ContentViews, which the made the code confusing. So, instead of making such method public, so they can be overriden by tests (in order to keep track of whether ContentViews have been created), now those methods are private, and a new method didCreateContentView() has been exposed so that the tests can assert the ContentView's existence. BUG=542785 BUG=542786 BUG=542790 Committed: https://crrev.com/9893e6aff9f1811ca5e0e3b3ab4f9fac19afec92 Cr-Commit-Position: refs/heads/master@{#354161}

Patch Set 1 #

Total comments: 22

Patch Set 2 : fix #

Patch Set 3 : Addressing comments #

Patch Set 4 : Add TODO as per offline chat with mdjones@ #

Total comments: 4

Patch Set 5 : Addressing Aurimas' comments #

Patch Set 6 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -178 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayContentDelegate.java View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java View 1 2 3 4 5 17 chunks +88 lines, -69 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java View 1 2 3 4 5 10 chunks +49 lines, -39 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelBase.java View 1 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java View 1 2 3 4 5 4 chunks +7 lines, -7 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/OverlayPanelContentFactory.java View 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/ContextualSearchLayout.java View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java View 1 2 3 4 5 2 chunks +1 line, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchStaticEventFilter.java View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchEventFilterTest.java View 1 chunk +3 lines, -7 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFakeServer.java View 1 2 5 chunks +45 lines, -44 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java View 1 2 3 4 4 chunks +10 lines, -4 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
pedro (no code reviews)
Hey guys, please take a look at this change.
5 years, 2 months ago (2015-10-13 18:42:05 UTC) #2
pedro (no code reviews)
Oops. Now adding the right dtrainor@!
5 years, 2 months ago (2015-10-13 18:43:09 UTC) #4
Donn Denman
Pedro, I think this is close, but have a question about tests ,and nits and ...
5 years, 2 months ago (2015-10-13 21:06:21 UTC) #5
mdjones
https://codereview.chromium.org/1403813003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java (right): https://codereview.chromium.org/1403813003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java#newcode149 chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java:149: destroyPromoView(); I think promo view creation should be controlled ...
5 years, 2 months ago (2015-10-14 00:47:30 UTC) #7
pedro (no code reviews)
David, please take a look. https://codereview.chromium.org/1403813003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java (right): https://codereview.chromium.org/1403813003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java#newcode68 chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java:68: * The observer used ...
5 years, 2 months ago (2015-10-14 18:07:06 UTC) #8
David Trainor- moved to gerrit
lgtm
5 years, 2 months ago (2015-10-14 18:15:38 UTC) #9
pedro (no code reviews)
Hey Aurimas, as we discussed offline, Donn is OOO for the rest of the week, ...
5 years, 2 months ago (2015-10-14 20:12:01 UTC) #11
aurimas (slooooooooow)
Overall looks like a great clean up. LGTM https://codereview.chromium.org/1403813003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java (right): https://codereview.chromium.org/1403813003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java#newcode268 chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java:268: public ...
5 years, 2 months ago (2015-10-14 21:56:11 UTC) #12
pedro (no code reviews)
Thanks! https://codereview.chromium.org/1403813003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java (right): https://codereview.chromium.org/1403813003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java#newcode268 chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java:268: public void acknowledgeIntentToShowContent() { On 2015/10/14 21:56:11, aurimas ...
5 years, 2 months ago (2015-10-14 22:43:37 UTC) #13
mdjones
lgtm
5 years, 2 months ago (2015-10-14 23:20:01 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1403813003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1403813003/100001
5 years, 2 months ago (2015-10-14 23:20:48 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 2 months ago (2015-10-15 00:11:08 UTC) #18
commit-bot: I haz the power
5 years, 2 months ago (2015-10-15 00:11:43 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/9893e6aff9f1811ca5e0e3b3ab4f9fac19afec92
Cr-Commit-Position: refs/heads/master@{#354161}

Powered by Google App Engine
This is Rietveld 408576698