| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/autocomplete/autocomplete_popup_contents_view.h" | 5 #include "chrome/browser/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/theme_provider.h" | 10 #include "app/theme_provider.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 | 363 |
| 364 ResultViewState AutocompleteResultView::GetState() const { | 364 ResultViewState AutocompleteResultView::GetState() const { |
| 365 if (model_->IsSelectedIndex(model_index_)) | 365 if (model_->IsSelectedIndex(model_index_)) |
| 366 return SELECTED; | 366 return SELECTED; |
| 367 return model_->IsHoveredIndex(model_index_) ? HOVERED : NORMAL; | 367 return model_->IsHoveredIndex(model_index_) ? HOVERED : NORMAL; |
| 368 } | 368 } |
| 369 | 369 |
| 370 SkBitmap* AutocompleteResultView::GetIcon() const { | 370 SkBitmap* AutocompleteResultView::GetIcon() const { |
| 371 int icon = match_.starred ? | 371 int icon = match_.starred ? |
| 372 IDR_O2_STAR : AutocompleteMatch::TypeToIcon(match_.type); | 372 IDR_OMNIBOX_STAR : AutocompleteMatch::TypeToIcon(match_.type); |
| 373 if (model_->IsSelectedIndex(model_index_)) { | 373 if (model_->IsSelectedIndex(model_index_)) { |
| 374 switch (icon) { | 374 switch (icon) { |
| 375 case IDR_O2_GLOBE: icon = IDR_O2_GLOBE_SELECTED; break; | 375 case IDR_OMNIBOX_HTTP: icon = IDR_OMNIBOX_HTTP_SELECTED; break; |
| 376 case IDR_O2_HISTORY: icon = IDR_O2_HISTORY_SELECTED; break; | 376 case IDR_OMNIBOX_HISTORY: icon = IDR_OMNIBOX_HISTORY_SELECTED; break; |
| 377 case IDR_O2_SEARCH: icon = IDR_O2_SEARCH_SELECTED; break; | 377 case IDR_OMNIBOX_SEARCH: icon = IDR_OMNIBOX_SEARCH_SELECTED; break; |
| 378 case IDR_O2_MORE: icon = IDR_O2_MORE_SELECTED; break; | 378 case IDR_OMNIBOX_MORE: icon = IDR_OMNIBOX_MORE_SELECTED; break; |
| 379 case IDR_O2_STAR: icon = IDR_O2_STAR_SELECTED; break; | 379 case IDR_OMNIBOX_STAR: icon = IDR_OMNIBOX_STAR_SELECTED; break; |
| 380 default: NOTREACHED(); break; | 380 default: NOTREACHED(); break; |
| 381 } | 381 } |
| 382 } | 382 } |
| 383 return ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); | 383 return ResourceBundle::GetSharedInstance().GetBitmapNamed(icon); |
| 384 } | 384 } |
| 385 | 385 |
| 386 int AutocompleteResultView::DrawString( | 386 int AutocompleteResultView::DrawString( |
| 387 gfx::Canvas* canvas, | 387 gfx::Canvas* canvas, |
| 388 const std::wstring& text, | 388 const std::wstring& text, |
| 389 const ACMatchClassifications& classifications, | 389 const ACMatchClassifications& classifications, |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 // static | 864 // static |
| 865 AutocompletePopupView* AutocompletePopupView::CreatePopupView( | 865 AutocompletePopupView* AutocompletePopupView::CreatePopupView( |
| 866 const gfx::Font& font, | 866 const gfx::Font& font, |
| 867 AutocompleteEditView* edit_view, | 867 AutocompleteEditView* edit_view, |
| 868 AutocompleteEditModel* edit_model, | 868 AutocompleteEditModel* edit_model, |
| 869 Profile* profile, | 869 Profile* profile, |
| 870 const BubblePositioner* bubble_positioner) { | 870 const BubblePositioner* bubble_positioner) { |
| 871 return new AutocompletePopupContentsView(font, edit_view, edit_model, | 871 return new AutocompletePopupContentsView(font, edit_view, edit_model, |
| 872 profile, bubble_positioner); | 872 profile, bubble_positioner); |
| 873 } | 873 } |
| OLD | NEW |