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

Issue 12631008: alternate ntp: implement Show/HideBars API to reduce jank when showing/hiding bars (Closed)

Created:
7 years, 9 months ago by kuan
Modified:
7 years, 9 months ago
CC:
chromium-reviews, melevin, dhollowa+watch_chromium.org, sreeram, gideonwald, dominich, Aaron Boodman, David Black, samarth+watch_chromium.org, chromium-apps-reviews_chromium.org, darin-cc_chromium.org, Jered
Visibility:
Public.

Description

alternate ntp: implement Show/HideBars SearchBox API to reduce jank when showing/hiding bars this is the chrome side combining melevin@'s renderer parts with my browser parts; gws side is implemented by melevin@. - when suggestions show/hide, bookmark and info bars hide/show respectively; this causes contents to shift up/down respectively, resulting in jank. - to reduce jank, these APIs synchronize the showing/hiding of suggestions in gws with the showing/hiding of bookmark and info bars in browser. - gws sends HideBars() whenever suggestions show, and ShowBars() whenever they close. - browser only obliges when bookmark and/or info bars are enabled and only on NTP and SERP pages, but always fires onbarshidden event for every HideBars() call, so that gws can proceed to show suggestions. BUG=176146, 178550, 175776 TEST=verify as per bug rpts Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188994

Patch Set 1 #

Total comments: 18

Patch Set 2 : redesign & refactor per david's and peter's comments #

Patch Set 3 : fix to hide infobars when switching back to tab w/ suggestions fading up #

Patch Set 4 : rebased, resolved conflicts #

Total comments: 18

Patch Set 5 : addressed david's comments #

Patch Set 6 : revert obsolete changes in search.h/cc #

Total comments: 14

Patch Set 7 : addressed david's comments #

Patch Set 8 : fixed mac build #

Patch Set 9 : fixed mac build #

Patch Set 10 : correct prev patch for mac #

Patch Set 11 : fixed interactive_ui_test break #

Patch Set 12 : fixed flashing bars for DEFAULT->SUGGESTIONS->SERP #

Total comments: 7

Patch Set 13 : addressed peter's comment #

Patch Set 14 : modify ChangeInfoBarService #

Patch Set 15 : removed unused header #

Total comments: 2

Patch Set 16 : rebased, resolved conflicts #

Patch Set 17 : added peter's comment #

Patch Set 18 : rebased, resolved conflicts #

Patch Set 19 : fixed build break #

Unified diffs Side-by-side diffs Delta from patch set Stats (+348 lines, -120 lines) Patch
M chrome/browser/infobars/infobar_container.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/infobars/infobar_container.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +22 lines, -30 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 2 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +18 lines, -35 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +24 lines, -1 line 0 comments Download
M chrome/browser/ui/search/search_delegate.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/search/search_delegate.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/search/search_model.h View 1 2 3 4 5 6 1 chunk +34 lines, -5 lines 0 comments Download
M chrome/browser/ui/search/search_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +53 lines, -4 lines 0 comments Download
M chrome/browser/ui/search/search_model_observer.h View 1 2 3 4 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/search/search_tab_helper.h View 1 2 3 4 5 6 3 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/ui/search/search_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +31 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/frame/instant_overlay_controller_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +21 lines, -5 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/common/search_types.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/searchbox_api.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/renderer/searchbox/searchbox.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/renderer/searchbox/searchbox.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +20 lines, -0 lines 0 comments Download
M chrome/renderer/searchbox/searchbox_extension.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/searchbox/searchbox_extension.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +46 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
kuan
if desired, pls split the review as follows: - dhollowa: chrome/browser/ui/search - pkasting: chrome/browser/ui/browser*.*, chrome/browser/infobars ...
7 years, 9 months ago (2013-03-07 21:09:40 UTC) #1
dhollowa
https://codereview.chromium.org/12631008/diff/1/chrome/browser/infobars/infobar_container.h File chrome/browser/infobars/infobar_container.h (right): https://codereview.chromium.org/12631008/diff/1/chrome/browser/infobars/infobar_container.h#newcode113 chrome/browser/infobars/infobar_container.h:113: // InstantOverlayModelObserver: This should be moved down under the ...
7 years, 9 months ago (2013-03-08 00:03:31 UTC) #2
Peter Kasting
https://codereview.chromium.org/12631008/diff/1/chrome/browser/infobars/infobar_container.cc File chrome/browser/infobars/infobar_container.cc (right): https://codereview.chromium.org/12631008/diff/1/chrome/browser/infobars/infobar_container.cc#newcode178 chrome/browser/infobars/infobar_container.cc:178: const chrome::search::Mode& new_mode) { I'm not terribly thrilled by ...
7 years, 9 months ago (2013-03-08 00:51:36 UTC) #3
dhollowa
https://codereview.chromium.org/12631008/diff/1/chrome/browser/infobars/infobar_container.cc File chrome/browser/infobars/infobar_container.cc (right): https://codereview.chromium.org/12631008/diff/1/chrome/browser/infobars/infobar_container.cc#newcode178 chrome/browser/infobars/infobar_container.cc:178: const chrome::search::Mode& new_mode) { On 2013/03/08 00:51:36, Peter Kasting ...
7 years, 9 months ago (2013-03-08 01:14:19 UTC) #4
palmer
IPC security LGTM.
7 years, 9 months ago (2013-03-11 18:03:08 UTC) #5
kuan
i've redesigned and refactored per david's and peter's comments. ptal. thx. https://codereview.chromium.org/12631008/diff/1/chrome/browser/infobars/infobar_container.cc File chrome/browser/infobars/infobar_container.cc (right): ...
7 years, 9 months ago (2013-03-12 18:00:37 UTC) #6
dhollowa
https://codereview.chromium.org/12631008/diff/21001/chrome/browser/instant/search.h File chrome/browser/instant/search.h (right): https://codereview.chromium.org/12631008/diff/21001/chrome/browser/instant/search.h#newcode161 chrome/browser/instant/search.h:161: bool ShouldHandleTopBarsVisibilityChange(const Mode& old_mode, This should live in search_model.h/cc. ...
7 years, 9 months ago (2013-03-13 17:21:55 UTC) #7
kuan
i've addressed david's comments in patch sets 5 & 6. ptal. thx. https://codereview.chromium.org/12631008/diff/21001/chrome/browser/instant/search.h File chrome/browser/instant/search.h ...
7 years, 9 months ago (2013-03-13 22:21:06 UTC) #8
dhollowa
https://codereview.chromium.org/12631008/diff/27006/chrome/browser/ui/search/search_model.cc File chrome/browser/ui/search/search_model.cc (right): https://codereview.chromium.org/12631008/diff/27006/chrome/browser/ui/search/search_model.cc#newcode79 chrome/browser/ui/search/search_model.cc:79: bool SearchModel::ShouldChangeTopBarsVisibility(const State& old_state, Public static methods go to ...
7 years, 9 months ago (2013-03-14 00:30:58 UTC) #9
kuan
i've addressed david's comments in patch set 7. ptal. thx. https://codereview.chromium.org/12631008/diff/27006/chrome/browser/ui/search/search_model.cc File chrome/browser/ui/search/search_model.cc (right): https://codereview.chromium.org/12631008/diff/27006/chrome/browser/ui/search/search_model.cc#newcode79 ...
7 years, 9 months ago (2013-03-14 00:44:18 UTC) #10
Peter Kasting
I think we can simplify the infobar container's operation even more by just making it ...
7 years, 9 months ago (2013-03-15 05:32:01 UTC) #11
dhollowa
lgtm
7 years, 9 months ago (2013-03-15 14:41:58 UTC) #12
kuan
i've addressed peter's comments in patch set 13. ptal. thx. https://codereview.chromium.org/12631008/diff/2002/chrome/browser/infobars/infobar_container.cc File chrome/browser/infobars/infobar_container.cc (right): https://codereview.chromium.org/12631008/diff/2002/chrome/browser/infobars/infobar_container.cc#newcode78 ...
7 years, 9 months ago (2013-03-15 15:53:48 UTC) #13
kuan
peter, i modified ChangeInfoBarService in patch set 14, see my reply below. ptal. thx. https://codereview.chromium.org/12631008/diff/2002/chrome/browser/infobars/infobar_container.cc ...
7 years, 9 months ago (2013-03-15 16:32:16 UTC) #14
Peter Kasting
https://codereview.chromium.org/12631008/diff/107001/chrome/browser/infobars/infobar_container.cc File chrome/browser/infobars/infobar_container.cc (right): https://codereview.chromium.org/12631008/diff/107001/chrome/browser/infobars/infobar_container.cc#newcode48 chrome/browser/infobars/infobar_container.cc:48: HideAllInfoBars(); We don't need to do this here. If ...
7 years, 9 months ago (2013-03-16 00:40:59 UTC) #15
kuan
https://codereview.chromium.org/12631008/diff/107001/chrome/browser/infobars/infobar_container.cc File chrome/browser/infobars/infobar_container.cc (right): https://codereview.chromium.org/12631008/diff/107001/chrome/browser/infobars/infobar_container.cc#newcode48 chrome/browser/infobars/infobar_container.cc:48: HideAllInfoBars(); On 2013/03/16 00:40:59, Peter Kasting wrote: > We ...
7 years, 9 months ago (2013-03-18 15:37:29 UTC) #16
Peter Kasting
On 2013/03/18 15:37:29, kuan wrote: > switching between tabs doesn't work correctly if i don't ...
7 years, 9 months ago (2013-03-18 19:10:30 UTC) #17
kuan
On 2013/03/18 19:10:30, Peter Kasting wrote: > On 2013/03/18 15:37:29, kuan wrote: > > switching ...
7 years, 9 months ago (2013-03-19 00:17:10 UTC) #18
Peter Kasting
OK, that's a good reason to do it like you have it. LGTM. I would ...
7 years, 9 months ago (2013-03-19 02:34:53 UTC) #19
kuan
peter, i've added your comment to the code. thx! one more lgtm to go... sreeram.. ...
7 years, 9 months ago (2013-03-19 02:52:24 UTC) #20
sreeram
lgtm
7 years, 9 months ago (2013-03-19 03:06:50 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kuan@chromium.org/12631008/99002
7 years, 9 months ago (2013-03-19 09:04:52 UTC) #22
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/search/search_tab_helper.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 9 months ago (2013-03-19 09:05:04 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kuan@chromium.org/12631008/132026
7 years, 9 months ago (2013-03-19 09:28:39 UTC) #24
commit-bot: I haz the power
7 years, 9 months ago (2013-03-19 11:23:10 UTC) #25
Message was sent while issue was closed.
Change committed as 188994

Powered by Google App Engine
This is Rietveld 408576698