| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.
h" | 5 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.
h" |
| 6 | 6 |
| 7 #include "app/bidi_line_iterator.h" | 7 #include "app/bidi_line_iterator.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "app/text_elider.h" | 10 #include "app/text_elider.h" |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 if (bitmap) | 518 if (bitmap) |
| 519 return bitmap; | 519 return bitmap; |
| 520 | 520 |
| 521 int icon = match_.starred ? | 521 int icon = match_.starred ? |
| 522 IDR_OMNIBOX_STAR : AutocompleteMatch::TypeToIcon(match_.type); | 522 IDR_OMNIBOX_STAR : AutocompleteMatch::TypeToIcon(match_.type); |
| 523 if (model_->IsSelectedIndex(model_index_)) { | 523 if (model_->IsSelectedIndex(model_index_)) { |
| 524 switch (icon) { | 524 switch (icon) { |
| 525 case IDR_OMNIBOX_HTTP: icon = IDR_OMNIBOX_HTTP_SELECTED; break; | 525 case IDR_OMNIBOX_HTTP: icon = IDR_OMNIBOX_HTTP_SELECTED; break; |
| 526 case IDR_OMNIBOX_HISTORY: icon = IDR_OMNIBOX_HISTORY_SELECTED; break; | 526 case IDR_OMNIBOX_HISTORY: icon = IDR_OMNIBOX_HISTORY_SELECTED; break; |
| 527 case IDR_OMNIBOX_SEARCH: icon = IDR_OMNIBOX_SEARCH_SELECTED; break; | 527 case IDR_OMNIBOX_SEARCH: icon = IDR_OMNIBOX_SEARCH_SELECTED; break; |
| 528 case IDR_OMNIBOX_MORE: icon = IDR_OMNIBOX_MORE_SELECTED; break; | |
| 529 case IDR_OMNIBOX_STAR: icon = IDR_OMNIBOX_STAR_SELECTED; break; | 528 case IDR_OMNIBOX_STAR: icon = IDR_OMNIBOX_STAR_SELECTED; break; |
| 530 default: NOTREACHED(); break; | 529 default: NOTREACHED(); break; |
| 531 } | 530 } |
| 532 } | 531 } |
| 533 return ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); | 532 return ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); |
| 534 } | 533 } |
| 535 | 534 |
| 536 int AutocompleteResultView::DrawString( | 535 int AutocompleteResultView::DrawString( |
| 537 gfx::Canvas* canvas, | 536 gfx::Canvas* canvas, |
| 538 const std::wstring& text, | 537 const std::wstring& text, |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 opt_in_view_ = NULL; | 1203 opt_in_view_ = NULL; |
| 1205 PromoCounter* counter = model_->profile()->GetInstantPromoCounter(); | 1204 PromoCounter* counter = model_->profile()->GetInstantPromoCounter(); |
| 1206 DCHECK(counter); | 1205 DCHECK(counter); |
| 1207 counter->Hide(); | 1206 counter->Hide(); |
| 1208 if (opt_in) { | 1207 if (opt_in) { |
| 1209 browser::ShowInstantConfirmDialogIfNecessary( | 1208 browser::ShowInstantConfirmDialogIfNecessary( |
| 1210 location_bar_->GetWindow()->GetNativeWindow(), model_->profile()); | 1209 location_bar_->GetWindow()->GetNativeWindow(), model_->profile()); |
| 1211 } | 1210 } |
| 1212 UpdatePopupAppearance(); | 1211 UpdatePopupAppearance(); |
| 1213 } | 1212 } |
| OLD | NEW |