| Index: chrome/browser/cocoa/location_bar/selected_keyword_decoration.mm
|
| diff --git a/chrome/browser/cocoa/location_bar/selected_keyword_decoration.mm b/chrome/browser/cocoa/location_bar/selected_keyword_decoration.mm
|
| index ebb62bf83c5dc61f1581b7af1f3a7ec15e36d338..3c593ac9358d077903ea75d848d7bc3dadb97a3e 100644
|
| --- a/chrome/browser/cocoa/location_bar/selected_keyword_decoration.mm
|
| +++ b/chrome/browser/cocoa/location_bar/selected_keyword_decoration.mm
|
| @@ -30,12 +30,12 @@ CGFloat SelectedKeywordDecoration::GetWidthForSpace(CGFloat width) {
|
| const CGFloat full_width =
|
| GetWidthForImageAndLabel(search_image_, full_string_);
|
| if (full_width <= width) {
|
| - SetImage(search_image_);
|
| + BubbleDecoration::SetImage(search_image_);
|
| SetLabel(full_string_);
|
| return full_width;
|
| }
|
|
|
| - SetImage(nil);
|
| + BubbleDecoration::SetImage(nil);
|
| const CGFloat no_image_width = GetWidthForImageAndLabel(nil, full_string_);
|
| if (no_image_width <= width || !partial_string_) {
|
| SetLabel(full_string_);
|
| @@ -65,3 +65,9 @@ void SelectedKeywordDecoration::SetKeyword(const std::wstring& short_name,
|
| [l10n_util::GetNSStringF(message_id, WideToUTF16(min_name)) copy]);
|
| }
|
| }
|
| +
|
| +void SelectedKeywordDecoration::SetImage(NSImage* image) {
|
| + if (image != search_image_)
|
| + search_image_.reset([image retain]);
|
| + BubbleDecoration::SetImage(image);
|
| +}
|
|
|