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

Issue 2973006: Use the extension icon for extension omnibox results instead of the generic (Closed)

Created:
10 years, 5 months ago by Matt Perry
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, John Grabowski, Erik does not do reviews, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Use the extension icon for extension omnibox results instead of the generic search icon. I refactored the extension menu manager to separate the icon-specific bits. BUG=46479 TEST=load the chrome search extension at src/chrome/common/extensions/docs/examples/extensions/chrome_search/ and type "src foo" into the omnibox. You should see the extension icon instead of the magnifying glass. Switch back and forth between the "src" keyword result, other results, and other keywords and the icons should update properly. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52535

Patch Set 1 #

Patch Set 2 : whitespace #

Total comments: 24

Patch Set 3 : feedback #

Total comments: 3

Patch Set 4 : fixed mac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+372 lines, -136 lines) Patch
M chrome/browser/autocomplete/autocomplete_popup_model.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_model.cc View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_view_gtk.h View 4 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc View 1 2 5 chunks +31 lines, -21 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_view_mac.h View 1 2 3 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_view_mac.mm View 1 2 3 4 chunks +14 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm View 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/autocomplete_text_field_unittest.mm View 4 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/location_bar_view_mac.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/location_bar_view_mac.mm View 1 2 3 2 chunks +13 lines, -1 line 0 comments Download
M chrome/browser/cocoa/location_bar/selected_keyword_decoration.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/selected_keyword_decoration.mm View 2 chunks +8 lines, -2 lines 0 comments Download
A chrome/browser/extensions/extension_icon_manager.h View 1 chunk +66 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_icon_manager.cc View 1 chunk +96 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_menu_manager.h View 1 2 3 5 chunks +7 lines, -27 lines 0 comments Download
M chrome/browser/extensions/extension_menu_manager.cc View 1 2 3 7 chunks +9 lines, -75 lines 0 comments Download
M chrome/browser/extensions/extensions_service.h View 4 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/extensions/extensions_service.cc View 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/gtk/location_bar_view_gtk.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
chrome/browser/gtk/location_bar_view_gtk.cc View 1 2 2 chunks +20 lines, -2 lines 0 comments Download
M chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc View 1 2 3 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/views/location_bar/icon_label_bubble_view.h View 2 chunks +3 lines, -0 lines 0 comments Download
chrome/browser/views/location_bar/icon_label_bubble_view.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/views/location_bar/location_bar_view.cc View 1 2 3 2 chunks +14 lines, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/examples/extensions/chrome_search/background.html View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Matt Perry
Peter: autocomplete* Antony: the rest
10 years, 5 months ago (2010-07-12 22:19:48 UTC) #1
Peter Kasting
http://codereview.chromium.org/2973006/diff/2001/3001 File chrome/browser/autocomplete/autocomplete_edit.cc (right): http://codereview.chromium.org/2973006/diff/2001/3001#newcode19 chrome/browser/autocomplete/autocomplete_edit.cc:19: #include "chrome/browser/extensions/extensions_service.h" Nit: Also not sure why this got ...
10 years, 5 months ago (2010-07-12 22:48:06 UTC) #2
asargent_no_longer_on_chrome
Extension parts mostly LG with one small issue. (If you had any horrible problems with ...
10 years, 5 months ago (2010-07-12 23:45:56 UTC) #3
Matt Perry
http://codereview.chromium.org/2973006/diff/2001/3001 File chrome/browser/autocomplete/autocomplete_edit.cc (right): http://codereview.chromium.org/2973006/diff/2001/3001#newcode19 chrome/browser/autocomplete/autocomplete_edit.cc:19: #include "chrome/browser/extensions/extensions_service.h" On 2010/07/12 22:48:06, Peter Kasting wrote: > ...
10 years, 5 months ago (2010-07-13 00:24:16 UTC) #4
Peter Kasting
LGTM http://codereview.chromium.org/2973006/diff/16001/17022 File chrome/browser/views/location_bar/icon_label_bubble_view.cc (right): http://codereview.chromium.org/2973006/diff/16001/17022#newcode23 chrome/browser/views/location_bar/icon_label_bubble_view.cc:23: int contained_image, Nit: Could we now get rid ...
10 years, 5 months ago (2010-07-13 00:30:12 UTC) #5
asargent_no_longer_on_chrome
Ok, LGTM
10 years, 5 months ago (2010-07-13 00:34:00 UTC) #6
Scott Hess - ex-Googler
10 years, 5 months ago (2010-07-13 21:24:29 UTC) #7
LGTM, though I encourage just dropping the SkBitmap->NSImage cache, unless my
comments show that I misunderstand things.

http://codereview.chromium.org/2973006/diff/16001/17005
File chrome/browser/autocomplete/autocomplete_popup_view_mac.h (right):

http://codereview.chromium.org/2973006/diff/16001/17005#newcode27
chrome/browser/autocomplete/autocomplete_popup_view_mac.h:27: @class NSImage;
Elsewhere the style is to just alphabetize class/@class in one big block.

http://codereview.chromium.org/2973006/diff/16001/17005#newcode135
chrome/browser/autocomplete/autocomplete_popup_view_mac.h:135: ImageMap images_;
How many of these are we going to have at any given time?  I'm not sure that a
cache is really justified if we're only looking at only one or two conversions
per keystroke.  And the field already will be doing one.

Additionally - are we guaranteed that the SkBitmap* will live for the long term,
even when the extension is uninstalled or updated?  Seems to me like we might
end up with a certain number of undead objects in there, which will result in
extraneous NSImage objects hanging around.

Powered by Google App Engine
This is Rietveld 408576698