| 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/autocomplete/autocomplete_popup_model.h" | 5 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "unicode/ubidi.h" | 9 #include "unicode/ubidi.h" |
| 10 | 10 |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 13 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 14 #include "chrome/browser/autocomplete/autocomplete_match.h" | 14 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 15 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" | 15 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" |
| 16 #include "chrome/browser/autocomplete/search_provider.h" | 16 #include "chrome/browser/autocomplete/search_provider.h" |
| 17 #include "chrome/browser/extensions/extension_service.h" | 17 #include "chrome/browser/extensions/extension_service.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/search_engines/template_url.h" | 19 #include "chrome/browser/search_engines/template_url.h" |
| 20 #include "chrome/browser/search_engines/template_url_model.h" | 20 #include "chrome/browser/search_engines/template_url_model.h" |
| 21 #include "chrome/common/notification_details.h" | 21 #include "chrome/common/notification_details.h" |
| 22 #include "chrome/common/notification_source.h" | 22 #include "chrome/common/notification_source.h" |
| 23 #include "gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
| 24 | 24 |
| 25 /////////////////////////////////////////////////////////////////////////////// | 25 /////////////////////////////////////////////////////////////////////////////// |
| 26 // AutocompletePopupModel | 26 // AutocompletePopupModel |
| 27 | 27 |
| 28 AutocompletePopupModel::AutocompletePopupModel( | 28 AutocompletePopupModel::AutocompletePopupModel( |
| 29 AutocompletePopupView* popup_view, | 29 AutocompletePopupView* popup_view, |
| 30 AutocompleteEditModel* edit_model, | 30 AutocompleteEditModel* edit_model, |
| 31 Profile* profile) | 31 Profile* profile) |
| 32 : view_(popup_view), | 32 : view_(popup_view), |
| 33 edit_model_(edit_model), | 33 edit_model_(edit_model), |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 } | 315 } |
| 316 | 316 |
| 317 const SkBitmap* AutocompletePopupModel::GetSpecialIconForMatch( | 317 const SkBitmap* AutocompletePopupModel::GetSpecialIconForMatch( |
| 318 const AutocompleteMatch& match) const { | 318 const AutocompleteMatch& match) const { |
| 319 if (!match.template_url || !match.template_url->IsExtensionKeyword()) | 319 if (!match.template_url || !match.template_url->IsExtensionKeyword()) |
| 320 return NULL; | 320 return NULL; |
| 321 | 321 |
| 322 return &profile_->GetExtensionService()->GetOmniboxPopupIcon( | 322 return &profile_->GetExtensionService()->GetOmniboxPopupIcon( |
| 323 match.template_url->GetExtensionId()); | 323 match.template_url->GetExtensionId()); |
| 324 } | 324 } |
| OLD | NEW |