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

Issue 11421079: Persist the Instant API to committed search result pages. (Closed)

Created:
8 years ago by sreeram
Modified:
8 years ago
Reviewers:
samarth, sky, Jered
CC:
chromium-reviews, melevin, samarth, dominich, Aaron Boodman, David Black, chromium-apps-reviews_chromium.org, darin-cc_chromium.org, Shishir
Visibility:
Public.

Description

Persist the Instant API to committed search result pages. Whenever the active tab is an Instant search results page, |instant_tab_| is used to talk the Instant API with it. Also: + Replace uses of TabContents with WebContents as much as possible (in service of @avi's goal, http://crbug.com/107201). + Aggressively create the InstantLoader in many situations; update browser tests accordingly. + Don't send an initial resize on page load. This was only relevant for the erstwhile hidden Instant modes. + Delay delete the loader only when strictly necessary, such as when an InstantLoader method is on the call stack. At other times, prefer the much simpler loader_.reset(). + Don't bother resetting state. Resetting state has no practical benefit, since we already only use state variables when they are valid. Instead, this avoids tricky situations where we should NOT reset state just because the |loader_| is deleted (since the |instant_tab_| may still be in use). + Given the above two, remove DeleteLoader() entirely. + Separate out the magic in Hide() into three pieces: Hide(), HideInternal() and a couple of places where we want to preserve |last_full_text_|. I think this makes things slightly clearer. BUG=158942 R=jered@chromium.org,samarth@chromium.org,sky@chromium.org TEST=Commit a query. Change mode to News. Type another query. You should see results in News mode. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171018

Patch Set 1 #

Total comments: 54

Patch Set 2 : Kittens live! #

Total comments: 36

Patch Set 3 : More fixes #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1252 lines, -910 lines) Patch
M chrome/browser/automation/testing_automation_provider.cc View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/instant/instant_browsertest.cc View 1 2 28 chunks +70 lines, -72 lines 0 comments Download
A chrome/browser/instant/instant_client.h View 1 2 1 chunk +132 lines, -0 lines 0 comments Download
A chrome/browser/instant/instant_client.cc View 1 2 1 chunk +114 lines, -0 lines 0 comments Download
M chrome/browser/instant/instant_commit_type.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/instant/instant_controller.h View 1 2 10 chunks +69 lines, -47 lines 0 comments Download
M chrome/browser/instant/instant_controller.cc View 1 2 27 chunks +348 lines, -268 lines 2 comments Download
M chrome/browser/instant/instant_loader.h View 1 2 3 chunks +64 lines, -89 lines 0 comments Download
M chrome/browser/instant/instant_loader.cc View 1 2 9 chunks +148 lines, -257 lines 0 comments Download
M chrome/browser/instant/instant_model.h View 1 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/instant/instant_model.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/browser/instant/instant_tab.h View 1 2 1 chunk +64 lines, -0 lines 0 comments Download
A chrome/browser/instant/instant_tab.cc View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
M chrome/browser/instant/instant_unload_handler.h View 1 3 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/instant/instant_unload_handler.cc View 1 4 chunks +22 lines, -20 lines 0 comments Download
M chrome/browser/task_manager/task_manager_resource_providers.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser_instant_controller.h View 1 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.cc View 1 2 4 chunks +11 lines, -15 lines 0 comments Download
M chrome/browser/ui/cocoa/tab_contents/instant_preview_controller_mac.mm View 1 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 2 6 chunks +10 lines, -13 lines 0 comments Download
M chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/tab_contents_container_gtk.h View 1 5 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/ui/gtk/tab_contents_container_gtk.cc View 1 9 chunks +20 lines, -22 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_edit_model.cc View 1 2 3 chunks +15 lines, -24 lines 0 comments Download
M chrome/browser/ui/search/search_tab_helper.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/search/search_tab_helper.cc View 1 2 4 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/frame/instant_preview_controller_views.cc View 1 2 chunks +1 line, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/common/instant_types.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/instant_types.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/resources/extensions/searchbox_api.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/searchbox/searchbox.cc View 1 2 9 chunks +9 lines, -1 line 0 comments Download
M chrome/renderer/searchbox/searchbox_extension.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/searchbox/searchbox_extension.cc View 1 2 15 chunks +16 lines, -26 lines 0 comments Download
M chrome/test/functional/instant.py View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
sreeram
This is a somewhat big change in functionality, so I'd like as many eyeballs as ...
8 years ago (2012-11-26 22:07:07 UTC) #1
sky
https://codereview.chromium.org/11421079/diff/1/chrome/browser/instant/instant_client.cc File chrome/browser/instant/instant_client.cc (right): https://codereview.chromium.org/11421079/diff/1/chrome/browser/instant/instant_client.cc#newcode56 chrome/browser/instant/instant_client.cc:56: void InstantClient::NotifyInstantSupportDetermined(bool supports_instant) { I would name this SetInstantSupportDetermined. ...
8 years ago (2012-11-27 01:07:51 UTC) #2
samarth
[I need to make another pass over the code but here are some initial comments.] ...
8 years ago (2012-11-27 18:09:43 UTC) #3
Jered
I am still reading the meaty bits and will have more comments in a bit. ...
8 years ago (2012-11-27 18:19:53 UTC) #4
sreeram
Responding to the bigger question of composition vs inheritance first. Will respond to other comments ...
8 years ago (2012-11-27 18:41:32 UTC) #5
Jered
I like the splitting out of the WebContentsObserver from InstantLoader, but am now very confused ...
8 years ago (2012-11-27 19:21:57 UTC) #6
Jered
sreeram, samarth and I were chatting, and I thought we ought to continue here to ...
8 years ago (2012-11-27 20:09:02 UTC) #7
sky
I still vote for composition over inheritance. I think your concern can be alleviated by ...
8 years ago (2012-11-27 21:46:30 UTC) #8
samarth
Just to be clear, what we were discussing was something like a "InstantAPI" interface with ...
8 years ago (2012-11-28 06:31:15 UTC) #9
sky
Ben was griping today about a review he was looking at (not this one) and ...
8 years ago (2012-11-28 22:47:50 UTC) #10
sreeram
Uploaded patchset #2, addressing the following comments. PTAL. https://codereview.chromium.org/11421079/diff/1/chrome/browser/instant/instant_browsertest.cc File chrome/browser/instant/instant_browsertest.cc (right): https://codereview.chromium.org/11421079/diff/1/chrome/browser/instant/instant_browsertest.cc#newcode403 chrome/browser/instant/instant_browsertest.cc:403: // ...
8 years ago (2012-11-29 07:33:19 UTC) #11
Jered
Man that's quite a change. Looks pretty good overall, I think I follow what's going ...
8 years ago (2012-11-29 19:57:04 UTC) #12
samarth
LGTM Thanks for the refactoring--this is much easier to follow now! A few minor comments ...
8 years ago (2012-12-03 19:46:03 UTC) #13
sky
Thanks for separating things out. I only have high level comments. https://codereview.chromium.org/11421079/diff/12001/chrome/browser/instant/instant_client.h File chrome/browser/instant/instant_client.h (right): ...
8 years ago (2012-12-03 22:22:22 UTC) #14
sreeram
Uploaded patchset #3, addressing the following comments and fixing a bunch of other issues. PTAL. ...
8 years ago (2012-12-04 08:10:51 UTC) #15
sky
LGTM
8 years ago (2012-12-04 16:57:08 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sreeram@chromium.org/11421079/5004
8 years ago (2012-12-04 17:08:29 UTC) #17
sreeram
On 2012/12/04 16:57:08, sky wrote: > LGTM Thanks! I appreciate your super-responsive review, despite the ...
8 years ago (2012-12-04 17:12:48 UTC) #18
Jered
lgtm I am convinced that whatever problems remain are better addressed in new changes. Thanks ...
8 years ago (2012-12-04 19:05:03 UTC) #19
sreeram
https://codereview.chromium.org/11421079/diff/5004/chrome/browser/instant/instant_controller.cc File chrome/browser/instant/instant_controller.cc (right): https://codereview.chromium.org/11421079/diff/5004/chrome/browser/instant/instant_controller.cc#newcode895 chrome/browser/instant/instant_controller.cc:895: !allow_preview_to_show_search_suggestions_) On 2012/12/04 19:05:03, Jered wrote: > When is ...
8 years ago (2012-12-04 19:12:37 UTC) #20
commit-bot: I haz the power
Change committed as 171018
8 years ago (2012-12-04 19:15:02 UTC) #21
gideonwald
On 2012/12/04 19:15:02, I haz the power (commit-bot) wrote: > Change committed as 171018 +1 ...
8 years ago (2012-12-04 19:24:21 UTC) #22
Avi (use Gerrit)
8 years ago (2012-12-04 19:41:31 UTC) #23
Message was sent while issue was closed.
Thanks for the TabContent killing.

Powered by Google App Engine
This is Rietveld 408576698