|
|
Created:
8 years ago by Shishir Modified:
8 years ago CC:
chromium-reviews, melevin, dhollowa+watch_chromium.org, samarth, sreeram, gideonwald, dominich, arv (Not doing code reviews), David Black, jeremycho Base URL:
http://git.chromium.org/chromium/src.git@master Visibility:
Public. |
DescriptionAdding local html page used in Instant Extended mode when instant is disabled or unavailable.
BUG=159289, 142788, 134946
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173377
Patch Set 1 #
Total comments: 71
Patch Set 2 : Addressing comments from estade, dhollowa and samarth. #
Total comments: 4
Patch Set 3 : Addressing samarth's and sky's comments. #
Total comments: 30
Patch Set 4 : Addressing estade's comments.wq #
Total comments: 8
Patch Set 5 : Addressing estade's comments. #Patch Set 6 : Fix uninitialized variable. #Messages
Total messages: 28 (0 generated)
PTAL.
+estade for OWNERS Also, icon assets added with https://codereview.chromium.org/11519050
I just did a very light pass over the JS/HTML/CSS. We can clean things up in a follow-up change. Does this do the right thing in incognito of not sending requests to your search suggest provider? Thanks, Samarth https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... File chrome/browser/instant/instant_controller.cc (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.cc:942: if (ResetLoader(template_url, active_tab, false)) Please explain why we don't want to use fallback in this case. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... File chrome/browser/instant/instant_loader.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_loader.h:90: bool IsLoadingLocalOmniboxPopupURL() const; How about something like UsingLocalPreview()? (IsLoading implies this is checking if we're still loading) https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:7: cursor: default ; at the end https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:27: .unselected { Just drop this section https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:31: margin-bottom: 2px ; at the end https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:4: <script src='chrome://resources/js/util.js'></script> nit: please fix up indentation in this file. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:86: for (var i = 0, suggestion; suggestion = nativeSuggestions[i++];) { Check for i < 5 here. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:86: for (var i = 0, suggestion; suggestion = nativeSuggestions[i++];) { Put i++ in the last section, so you can just use i in the loop body. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:87: if (i > 5) break; Please make this a constant in this file. https://codereview.chromium.org/11555033/diff/1/chrome/common/url_constants.h File chrome/common/url_constants.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/common/url_constants.h... chrome/common/url_constants.h:175: extern const char kChromeUILocalOmniboxPopupHost[]; Can we just use this constant (or another constant defined in this file) instead of defining a second constant in InstantController? At the very least, it shouldn't be possible for the two to get out of sync as is the case right now.
A general comment on naming... "local omnibox popup" is very verbose and may be too specific going forward. Maybe "local search" instead? This would match the chrome::search naming. I believe Sreeram was inclined to rename Instant -> Search. And this is really a local SearchBoxAPI... I know its a bit painful to rename, sorry, but easier now than later. Thoughts? https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... File chrome/browser/instant/instant_controller.cc (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.cc:851: if (!GetInstantURL(template_url, &instant_url)) { This seems complicated. If there is just one |use_local_| that replaces |incognito_mode_| then |GetInstantURL| should succeed and the test for |use_fallback| can be removed. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... File chrome/browser/instant/instant_controller.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.h:49: bool incognito_mode); The notion of incognito is appropriate at the browser_instant_controller level, but by the time it gets here the concept is really more |local_mode| or |use_local|. Also, I'd think that it would be the browser_instant_controller's responsibility to detect changes in the default-search-provider and reset the InstantController with the new appropriate value for |local_mode| or |use_local|, no? This would apply to the offline case too I suppose, that is browser_instant_controller would reset instant_controller if the user is/goes offline. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.h:158: static const char* kLocalOmniboxPopupURL; nit: static const data members should be declared near the top of the class. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.h:176: bool use_fallback); nit: use_local https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:1: /* Copyright (c) 2012 The Chromium Authors. All rights reserved. nit: no (c) https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:30: height: 19px; Add image ref now please so we can verify that assets work. We can sort out the specific styling in subsquent CL. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:1: <!DOCTYPE html> nit: copyright https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. nit: no (c) https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:5: // ============================================================================= Remove debugging code. https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.cc (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. nit: no (c) https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.h:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. nit: no (c) https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.h:13: class LocalOmniboxPopupHandler : public content::WebUIMessageHandler { Please add comment explaining the role of this class. https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.cc (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. nit: no (c) https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.h:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. nit: no (c)
FYI, +1 for local_search. I was originally going to suggest local_instant_overlay / local_instant_previews but local_search is pithier. Samarth
On 2012/12/13 01:24:46, samarth wrote: > FYI, +1 for local_search. I was originally going to suggest > local_instant_overlay / local_instant_previews but local_search is pithier. > > Samarth "local search" means something else within google. "client side search"? I dunno. Probably nobody will be confused by it.
On 2012/12/13 01:28:56, Jered wrote: > On 2012/12/13 01:24:46, samarth wrote: > > FYI, +1 for local_search. I was originally going to suggest > > local_instant_overlay / local_instant_previews but local_search is pithier. > > > > Samarth > > "local search" means something else within google. > "client side search"? I dunno. Probably nobody will be confused by it. Chrome is not Google. ;-)
https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:5: // ============================================================================= On 2012/12/13 01:20:15, dhollowa wrote: > Remove debugging code. Actually, unless you have a strong objection, it'll be useful to be able to just navigate to this page and debug any issues.
https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:5: // ============================================================================= On 2012/12/13 01:32:09, samarth wrote: > On 2012/12/13 01:20:15, dhollowa wrote: > > Remove debugging code. > > Actually, unless you have a strong objection, it'll be useful to be able to just > navigate to this page and debug any issues. I predict estade@ will veto this. I personally keep a debug.patch file and apply it locally when I need to do this kind of thing. Also, question: shouldn't all this live in some namespace/object so that globals don't collide with other chrome: bits?
https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:10: } newlines between rules blocks https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:22: padding-left: 29px probably want -webkit-padding-start https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:32: margin-left: 5px; probably want -webkit-margin-start/end https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:10: <div id='suggestionsBox'> indent, or vertical whitespace, or something to make this easier to read https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:54: suggestionDiv.className = 'selected suggestion'; you shouldn't need a 'selected' and 'unselected'. You can always do :not(.selected). https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:66: var rid = suggestion.rid; please come up with a better variable name than rid. I have no idea what rid is. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:103: if (suggestion.className == 'selected suggestion') { no curlies for single line if statements (imo) https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:115: if (index >= suggestions.length) { consider index = max(index, suggesions.length - 1); https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:118: for (var i = 0, suggestion; suggestion = suggestions[i++];) { consider $('suggestionsBox').querySelector('.selected.suggestion').classList.remove('selected'); var newSelection = $('suggestionsBox').querySelector('.suggestion:nth-of-type(' + index + ')'); /* ... */ https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:131: for (var i = 0, childNode; childNode = suggestion.childNodes[i++];) { why not put i++ in the traditional location? imo this is harder to read
PTAL. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... File chrome/browser/instant/instant_controller.cc (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.cc:851: if (!GetInstantURL(template_url, &instant_url)) { On 2012/12/13 01:20:15, dhollowa wrote: > This seems complicated. If there is just one |use_local_| that replaces > |incognito_mode_| then |GetInstantURL| should succeed and the test for > |use_fallback| can be removed. The use fallback is required for a different reason. When we try to find a keyword specific instant url, we don't want to fallback. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.cc:942: if (ResetLoader(template_url, active_tab, false)) On 2012/12/13 00:58:21, samarth wrote: > Please explain why we don't want to use fallback in this case. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... File chrome/browser/instant/instant_controller.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.h:49: bool incognito_mode); On 2012/12/13 01:20:15, dhollowa wrote: > The notion of incognito is appropriate at the browser_instant_controller level, > but by the time it gets here the concept is really more |local_mode| or > |use_local|. > > Also, I'd think that it would be the browser_instant_controller's responsibility > to detect changes in the default-search-provider and reset the InstantController > with the new appropriate value for |local_mode| or |use_local|, no? > > This would apply to the offline case too I suppose, that is > browser_instant_controller would reset instant_controller if the user is/goes > offline. Like we discussed, renamed to use_local_preview_only. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.h:158: static const char* kLocalOmniboxPopupURL; On 2012/12/13 01:20:15, dhollowa wrote: > nit: static const data members should be declared near the top of the class. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_controller.h:176: bool use_fallback); On 2012/12/13 01:20:15, dhollowa wrote: > nit: use_local changed to fallback_to_local. https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... File chrome/browser/instant/instant_loader.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/instant/instan... chrome/browser/instant/instant_loader.h:90: bool IsLoadingLocalOmniboxPopupURL() const; On 2012/12/13 00:58:21, samarth wrote: > How about something like UsingLocalPreview()? (IsLoading implies this is > checking if we're still loading) Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:1: /* Copyright (c) 2012 The Chromium Authors. All rights reserved. On 2012/12/13 01:20:15, dhollowa wrote: > nit: no (c) Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:7: cursor: default On 2012/12/13 00:58:21, samarth wrote: > ; at the end Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:10: } On 2012/12/13 02:20:54, Evan Stade wrote: > newlines between rules blocks Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:22: padding-left: 29px On 2012/12/13 02:20:54, Evan Stade wrote: > probably want -webkit-padding-start Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:27: .unselected { On 2012/12/13 00:58:21, samarth wrote: > Just drop this section Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:30: height: 19px; On 2012/12/13 01:20:15, dhollowa wrote: > Add image ref now please so we can verify that assets work. We can sort out the > specific styling in subsquent CL. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:31: margin-bottom: 2px On 2012/12/13 00:58:21, samarth wrote: > ; at the end Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:32: margin-left: 5px; On 2012/12/13 02:20:54, Evan Stade wrote: > probably want -webkit-margin-start/end Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:1: <!DOCTYPE html> On 2012/12/13 01:20:15, dhollowa wrote: > nit: copyright Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:4: <script src='chrome://resources/js/util.js'></script> On 2012/12/13 00:58:21, samarth wrote: > nit: please fix up indentation in this file. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:10: <div id='suggestionsBox'> On 2012/12/13 02:20:54, Evan Stade wrote: > indent, or vertical whitespace, or something to make this easier to read Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. On 2012/12/13 01:20:15, dhollowa wrote: > nit: no (c) Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:5: // ============================================================================= On 2012/12/13 01:48:19, dhollowa wrote: > On 2012/12/13 01:32:09, samarth wrote: > > On 2012/12/13 01:20:15, dhollowa wrote: > > > Remove debugging code. > > > > Actually, unless you have a strong objection, it'll be useful to be able to > just > > navigate to this page and debug any issues. > > I predict estade@ will veto this. I personally keep a debug.patch file and > apply it locally when I need to do this kind of thing. I agree with david that we should remove the debug info since it will be served in production chrome. @estade thoughts? > > Also, question: shouldn't all this live in some namespace/object so that globals > don't collide with other chrome: bits? All chrome specific state should will be in the chrome.* namesapce so I don't forsee any collisions. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:54: suggestionDiv.className = 'selected suggestion'; On 2012/12/13 02:20:54, Evan Stade wrote: > you shouldn't need a 'selected' and 'unselected'. You can always do > :not(.selected). Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:66: var rid = suggestion.rid; On 2012/12/13 02:20:54, Evan Stade wrote: > please come up with a better variable name than rid. I have no idea what rid is. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:86: for (var i = 0, suggestion; suggestion = nativeSuggestions[i++];) { On 2012/12/13 00:58:21, samarth wrote: > Put i++ in the last section, so you can just use i in the loop body. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:86: for (var i = 0, suggestion; suggestion = nativeSuggestions[i++];) { On 2012/12/13 00:58:21, samarth wrote: > Check for i < 5 here. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:87: if (i > 5) break; On 2012/12/13 00:58:21, samarth wrote: > Please make this a constant in this file. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:103: if (suggestion.className == 'selected suggestion') { On 2012/12/13 02:20:54, Evan Stade wrote: > no curlies for single line if statements (imo) Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:115: if (index >= suggestions.length) { On 2012/12/13 02:20:54, Evan Stade wrote: > consider > > index = max(index, suggesions.length - 1); Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:118: for (var i = 0, suggestion; suggestion = suggestions[i++];) { On 2012/12/13 02:20:54, Evan Stade wrote: > consider > > $('suggestionsBox').querySelector('.selected.suggestion').classList.remove('selected'); > > var newSelection = $('suggestionsBox').querySelector('.suggestion:nth-of-type(' > + index + ')'); > /* ... */ Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:131: for (var i = 0, childNode; childNode = suggestion.childNodes[i++];) { On 2012/12/13 02:20:54, Evan Stade wrote: > why not put i++ in the traditional location? imo this is harder to read Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.cc (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. On 2012/12/13 01:20:15, dhollowa wrote: > nit: no (c) Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.h:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. On 2012/12/13 01:20:15, dhollowa wrote: > nit: no (c) Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.h:13: class LocalOmniboxPopupHandler : public content::WebUIMessageHandler { On 2012/12/13 01:20:15, dhollowa wrote: > Please add comment explaining the role of this class. Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.cc (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. On 2012/12/13 01:20:15, dhollowa wrote: > nit: no (c) Done. https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/ui/webui/local... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.h:1: // Copyright (c) 2012 The Chromium Authors. All rights reserved. On 2012/12/13 01:20:15, dhollowa wrote: > nit: no (c) Done. https://codereview.chromium.org/11555033/diff/1/chrome/common/url_constants.h File chrome/common/url_constants.h (right): https://codereview.chromium.org/11555033/diff/1/chrome/common/url_constants.h... chrome/common/url_constants.h:175: extern const char kChromeUILocalOmniboxPopupHost[]; On 2012/12/13 00:58:21, samarth wrote: > Can we just use this constant (or another constant defined in this file) instead > of defining a second constant in InstantController? > > At the very least, it shouldn't be possible for the two to get out of sync as is > the case right now. As discussed this is hard to do since we are not allowed static string members.
On 2012/12/13 01:29:58, dhollowa wrote: > On 2012/12/13 01:28:56, Jered wrote: > > On 2012/12/13 01:24:46, samarth wrote: > > > FYI, +1 for local_search. I was originally going to suggest > > > local_instant_overlay / local_instant_previews but local_search is pithier. > > > > > > Samarth > > > > "local search" means something else within google. > > "client side search"? I dunno. Probably nobody will be confused by it. > > Chrome is not Google. ;-) Shishir, go with s/local_omnibox_popup/local_instant/ ?
On 2012/12/13 23:01:23, dhollowa wrote: > On 2012/12/13 01:29:58, dhollowa wrote: > > On 2012/12/13 01:28:56, Jered wrote: > > > On 2012/12/13 01:24:46, samarth wrote: > > > > FYI, +1 for local_search. I was originally going to suggest > > > > local_instant_overlay / local_instant_previews but local_search is > pithier. > > > > > > > > Samarth > > > > > > "local search" means something else within google. > > > "client side search"? I dunno. Probably nobody will be confused by it. > > > > Chrome is not Google. ;-) > > Shishir, go with s/local_omnibox_popup/local_instant/ ? Gah typo! s/local_omnibox_popup/local_search/ ?
Will do the name change in a followup CL as soon as this is in. I want to be absolutely sure we have consensus on the name and also want to minimize any chance of loosing comments. On Thu, Dec 13, 2012 at 3:01 PM, <[email protected]> wrote: > On 2012/12/13 23:01:23, dhollowa wrote: > >> On 2012/12/13 01:29:58, dhollowa wrote: >> > On 2012/12/13 01:28:56, Jered wrote: >> > > On 2012/12/13 01:24:46, samarth wrote: >> > > > FYI, +1 for local_search. I was originally going to suggest >> > > > local_instant_overlay / local_instant_previews but local_search is >> pithier. >> > > > >> > > > Samarth >> > > >> > > "local search" means something else within google. >> > > "client side search"? I dunno. Probably nobody will be confused by it. >> > >> > Chrome is not Google. ;-) >> > > Shishir, go with s/local_omnibox_popup/local_**instant/ ? >> > > Gah typo! s/local_omnibox_popup/local_**search/ ? > > https://codereview.chromium.**org/11555033/<https://codereview.chromium.org/1... >
On 2012/12/13 23:08:08, shishir_google.com wrote: > Will do the name change in a followup CL as soon as this is in. I want to > be absolutely sure we have consensus on the name and also want to minimize > any chance of loosing comments. > SG.
lgtm
instant LGTM https://codereview.chromium.org/11555033/diff/13002/chrome/browser/instant/in... File chrome/browser/instant/instant_controller.cc (right): https://codereview.chromium.org/11555033/diff/13002/chrome/browser/instant/in... chrome/browser/instant/instant_controller.cc:149: const char* InstantController::kLocalOmniboxPopupURL = For static we put // static on the previous line.
lgtm https://codereview.chromium.org/11555033/diff/13002/chrome/browser/instant/in... File chrome/browser/instant/instant_loader.h (right): https://codereview.chromium.org/11555033/diff/13002/chrome/browser/instant/in... chrome/browser/instant/instant_loader.h:89: // Returns true if the loader is loading InstantLoader::kLocalOmniboxPopupURL. nit: s/InstantLoader/InstantController/
https://codereview.chromium.org/11555033/diff/13002/chrome/browser/instant/in... File chrome/browser/instant/instant_controller.cc (right): https://codereview.chromium.org/11555033/diff/13002/chrome/browser/instant/in... chrome/browser/instant/instant_controller.cc:149: const char* InstantController::kLocalOmniboxPopupURL = On 2012/12/13 23:39:02, sky wrote: > For static we put // static on the previous line. Done. https://codereview.chromium.org/11555033/diff/13002/chrome/browser/instant/in... File chrome/browser/instant/instant_loader.h (right): https://codereview.chromium.org/11555033/diff/13002/chrome/browser/instant/in... chrome/browser/instant/instant_loader.h:89: // Returns true if the loader is loading InstantLoader::kLocalOmniboxPopupURL. On 2012/12/13 23:47:44, samarth wrote: > nit: s/InstantLoader/InstantController/ Done.
https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/1/chrome/browser/resources/loca... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:5: // ============================================================================= On 2012/12/13 22:57:58, Shishir wrote: > On 2012/12/13 01:48:19, dhollowa wrote: > > On 2012/12/13 01:32:09, samarth wrote: > > > On 2012/12/13 01:20:15, dhollowa wrote: > > > > Remove debugging code. > > > > > > Actually, unless you have a strong objection, it'll be useful to be able to > > just > > > navigate to this page and debug any issues. > > > > I predict estade@ will veto this. I personally keep a debug.patch file and > > apply it locally when I need to do this kind of thing. > > I agree with david that we should remove the debug info since it will be served > in production chrome. @estade thoughts? > > > > > Also, question: shouldn't all this live in some namespace/object so that > globals > > don't collide with other chrome: bits? > > All chrome specific state should will be in the chrome.* namesapce so I don't > forsee any collisions. > > I do prefer to keep debugging code out of the production page. You can commit it to the repo and then load it when you pass a flag, or something like that. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css (right): https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:19: margin-left: 91px; ditto about -webkit-margin-start https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html (right): https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:5: found in the LICENSE file. we seem to have a different style (or no header at all) in each html file :( https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:11: href='chrome://local-omnibox-popup/local_omnibox_popup.css'></link> don't align attributes, just indent 4 spaces https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:14: <div id='suggestionsBox'> nit: double quotes in html, single quotes in css and js https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:15: </div> nit: you can put </div> on same line as <div> https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:54: function addSuggestionToBox(suggestion, box, suggestionRank) { docs for every one of these functions and parameters. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:73: // TODO: hover stuff TODO(shouldAlwaysHaveANameHere): and the comment should have final punctuation and be more specific than "hover stuff". https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:76: restrictedIdDiv.className = 'rid'; better name than rid here too. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:86: for (var i = 0, suggestion; no need for suggestion to be inside the loop, or stored in a temp variable at all. i <= MAX && i <= nativeSuggestions.length https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:88: i++) { ++i https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:103: for (var i = 0, suggestion; suggestion = suggestions[i]; i++) { ++i https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:122: function getRid(suggestion) { perfect example of why you should not abbreviate things like restrictedId. This looks like "get rid of (i.e. delete) suggestion" https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:134: function getAPIObjectHandle() { getApiObjectHandle https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:180: selectSuggestionAtIndex(getSelectedSuggestionIndex() - 1, callback); does this handle overflow or underflow correctly? https://codereview.chromium.org/11555033/diff/18002/chrome/browser/ui/webui/l... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.cc (right): https://codereview.chromium.org/11555033/diff/18002/chrome/browser/ui/webui/l... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.cc:7: #include "chrome/browser/profiles/profile.h" can you hold off on adding this class till it actually does something?
PTAL. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css (right): https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.css:19: margin-left: 91px; On 2012/12/14 01:09:25, Evan Stade wrote: > ditto about -webkit-margin-start Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html (right): https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:5: found in the LICENSE file. On 2012/12/14 01:09:25, Evan Stade wrote: > we seem to have a different style (or no header at all) in each html file :( I saw them in some, and copied this one from: net_internals/help.html Would you rather I removed this? https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:11: href='chrome://local-omnibox-popup/local_omnibox_popup.css'></link> On 2012/12/14 01:09:25, Evan Stade wrote: > don't align attributes, just indent 4 spaces Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:14: <div id='suggestionsBox'> On 2012/12/14 01:09:25, Evan Stade wrote: > nit: double quotes in html, single quotes in css and js Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.html:15: </div> On 2012/12/14 01:09:25, Evan Stade wrote: > nit: you can put </div> on same line as <div> Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:54: function addSuggestionToBox(suggestion, box, suggestionRank) { On 2012/12/14 01:09:25, Evan Stade wrote: > docs for every one of these functions and parameters. Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:73: // TODO: hover stuff On 2012/12/14 01:09:25, Evan Stade wrote: > TODO(shouldAlwaysHaveANameHere): and the comment should have final punctuation > and be more specific than "hover stuff". Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:76: restrictedIdDiv.className = 'rid'; On 2012/12/14 01:09:25, Evan Stade wrote: > better name than rid here too. Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:86: for (var i = 0, suggestion; On 2012/12/14 01:09:25, Evan Stade wrote: > no need for suggestion to be inside the loop, or stored in a temp variable at > all. > > i <= MAX && i <= nativeSuggestions.length Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:88: i++) { On 2012/12/14 01:09:25, Evan Stade wrote: > ++i Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:103: for (var i = 0, suggestion; suggestion = suggestions[i]; i++) { On 2012/12/14 01:09:25, Evan Stade wrote: > ++i Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:122: function getRid(suggestion) { On 2012/12/14 01:09:25, Evan Stade wrote: > perfect example of why you should not abbreviate things like restrictedId. This > looks like "get rid of (i.e. delete) suggestion" Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:134: function getAPIObjectHandle() { On 2012/12/14 01:09:25, Evan Stade wrote: > getApiObjectHandle Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:180: selectSuggestionAtIndex(getSelectedSuggestionIndex() - 1, callback); On 2012/12/14 01:09:25, Evan Stade wrote: > does this handle overflow or underflow correctly? Done. https://codereview.chromium.org/11555033/diff/18002/chrome/browser/ui/webui/l... File chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.cc (right): https://codereview.chromium.org/11555033/diff/18002/chrome/browser/ui/webui/l... chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_handler.cc:7: #include "chrome/browser/profiles/profile.h" On 2012/12/14 01:09:25, Evan Stade wrote: > can you hold off on adding this class till it actually does something? Done.
lgtm with final comments https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:107: * Returns the restricted id for the input suggestion. here would be a good place to explain what a restricted id is. https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:113: if (suggestion.childNodes[i].className == 'restricted-id') classList.contains is more robust. https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:196: function onSubmit(e) { at least put a TODO inside here. https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:202: function setUpAPI() { setUpApi
All comments addressed. Submitting. https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... File chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js (right): https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:107: * Returns the restricted id for the input suggestion. On 2012/12/14 22:32:23, Evan Stade wrote: > here would be a good place to explain what a restricted id is. Done. https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:113: if (suggestion.childNodes[i].className == 'restricted-id') On 2012/12/14 22:32:23, Evan Stade wrote: > classList.contains is more robust. Done. https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:196: function onSubmit(e) { On 2012/12/14 22:32:23, Evan Stade wrote: > at least put a TODO inside here. Nothing needs to be done here. But the function needs to be defined. https://codereview.chromium.org/11555033/diff/20004/chrome/browser/resources/... chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js:202: function setUpAPI() { On 2012/12/14 22:32:23, Evan Stade wrote: > setUpApi Done.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/11555033/18004
Seems like the commit was manually aborted. Intentional?
Yes, there is apparently a bug with clicking that might have gotten introduced in my last upload. I am working on this right now and will commit tonight. On Fri, Dec 14, 2012 at 9:12 PM, <[email protected]> wrote: > Seems like the commit was manually aborted. Intentional? >
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/11555033/30001
Message was sent while issue was closed.
Change committed as 173377 |