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

Issue 11091050: InstantExtended: Add js api for custom logo. (Closed)

Created:
8 years, 2 months ago by Jered
Modified:
8 years, 1 month ago
Reviewers:
dhollowa, samarth, sreeram, sky
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, tfarina, samarth, gideonwald, dominich, Aaron Boodman, David Black, darin-cc_chromium.org, Shishir
Visibility:
Public.

Description

InstantExtended: Add js api for custom logo. Background: When the Instant page is warm and the search provider has a doodle, we want to show it immediately without first showing the baked-in logo (the user has already seen the baked-in logo transition away, and seeing that on every NTP would be annoying.) This adds an API which promises that the current overlay will respond to an NTP contextchange with a SetInstantPreviewHeight to show a custom logo. In this case, the NTP can just rely on Instant to draw the logo. BUG=142785

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -6 lines) Patch
M chrome/browser/instant/instant_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/instant/instant_controller.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/instant/instant_controller_delegate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/instant/instant_loader.cc View 3 chunks +21 lines, -0 lines 0 comments Download
M chrome/browser/instant/instant_loader_delegate.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.cc View 1 chunk +4 lines, -0 lines 1 comment Download
M chrome/browser/ui/browser_window.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/search_view_controller.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/search_view_controller.cc View 4 chunks +15 lines, -6 lines 0 comments Download
M chrome/common/render_messages.h View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/searchbox/searchbox_api.js View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/renderer/searchbox/searchbox.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/renderer/searchbox/searchbox.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/renderer/searchbox/searchbox_extension.cc View 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Jered
Please see 11091047 which Rietveld ate up for context. > Plumbing has_logo through the BrowserWindow ...
8 years, 2 months ago (2012-10-10 22:09:14 UTC) #1
samarth
http://codereview.chromium.org/11091050/diff/1/chrome/browser/ui/browser_instant_controller.cc File chrome/browser/ui/browser_instant_controller.cc (right): http://codereview.chromium.org/11091050/diff/1/chrome/browser/ui/browser_instant_controller.cc#newcode99 chrome/browser/ui/browser_instant_controller.cc:99: browser_->window()->SetInstantHasCustomLogo(has_logo); I agree with Sreeram that plumbing this through ...
8 years, 2 months ago (2012-10-10 22:16:52 UTC) #2
sreeram
On 2012/10/10 22:09:14, Jered wrote: > > Plumbing has_logo through the BrowserWindow interface seems misplaced. ...
8 years, 2 months ago (2012-10-10 22:21:55 UTC) #3
Jered
8 years, 1 month ago (2012-10-31 23:32:29 UTC) #4
We're not doing this anymore.

On 2012/10/10 22:21:55, sreeram wrote:
> On 2012/10/10 22:09:14, Jered wrote:
> > > Plumbing has_logo through the BrowserWindow interface seems misplaced. It
> > seems
> > > like this state belongs in SearchModel or somewhere similar from where the
> > > search_view_controller can extract the info. Perhaps @dhollowa can suggest
> the
> > > right course here?
> > Yeah, initially I wanted to put it in SearchModel, but it is per-browser,
not
> > per tab. I was confused by the fact that there seems to be a browser search
> > model as well as tab ones... I was also sort of confused about why
> > SearchViewController is attached to BrowserView and not to Browser.
> 
> IIUC, Each tab has a SearchModel, and the browser's SearchModel just has a
copy
> of the active tab's model (said copy getting updated whenever the active tab
> changes, in SearchDelegate::OnTabActivated()).
> 
> I think what we should do here is have a field in the SearchModel class that
is
> populated in the Browser's instance (i.e., Browser::search_model_) by Instant.
> Then, we can either:
> 1. Update each tab's model in the other direction (browser -> tab) when the
> active tab changes (in the same SearchDelegate method mentioned above), or
> 2. In SearchViewController, get hold of the Browser's model through
> BrowserView::browser().
> 
> > > I am also mildly concerned about the IPC bloat (due to all of our
searchbox
> > > changes). @sky, what do you think? If nobody cares, this is fine with me
> too.
> > If
> > > you think we should keep IPC surface small whenever possible, the has_logo
> bit
> > > can be communicated back in the existing InstantSupportDetermined IPC.
> > I have a slight preference for doing it this way so that the state is set
> > immediately through a method call like other state from js->Chrome in the
> > searchbox API.
> 
> Okay. Unless somebody else pipes up about IPC bloat, I am fine with it.

Powered by Google App Engine
This is Rietveld 408576698