| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 const bool show_keyword_hint = !keyword.empty() && is_keyword_hint; | 778 const bool show_keyword_hint = !keyword.empty() && is_keyword_hint; |
| 779 selected_keyword_view_->SetVisible(show_selected_keyword); | 779 selected_keyword_view_->SetVisible(show_selected_keyword); |
| 780 keyword_hint_view_->SetVisible(show_keyword_hint); | 780 keyword_hint_view_->SetVisible(show_keyword_hint); |
| 781 if (show_selected_keyword) { | 781 if (show_selected_keyword) { |
| 782 if (selected_keyword_view_->keyword() != keyword) { | 782 if (selected_keyword_view_->keyword() != keyword) { |
| 783 selected_keyword_view_->SetKeyword(keyword); | 783 selected_keyword_view_->SetKeyword(keyword); |
| 784 const TemplateURL* template_url = | 784 const TemplateURL* template_url = |
| 785 TemplateURLServiceFactory::GetForProfile(profile_)-> | 785 TemplateURLServiceFactory::GetForProfile(profile_)-> |
| 786 GetTemplateURLForKeyword(keyword); | 786 GetTemplateURLForKeyword(keyword); |
| 787 if (template_url && template_url->IsExtensionKeyword()) { | 787 if (template_url && template_url->IsExtensionKeyword()) { |
| 788 gfx::Image image = profile_->GetExtensionService()->GetOmniboxIcon( | 788 gfx::Image image = extensions::ExtensionSystem::Get(profile_)-> |
| 789 template_url->GetExtensionId()); | 789 extension_service()->GetOmniboxIcon(template_url->GetExtensionId()); |
| 790 selected_keyword_view_->SetImage(image.AsImageSkia()); | 790 selected_keyword_view_->SetImage(image.AsImageSkia()); |
| 791 selected_keyword_view_->set_is_extension_icon(true); | 791 selected_keyword_view_->set_is_extension_icon(true); |
| 792 } else { | 792 } else { |
| 793 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 793 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 794 selected_keyword_view_->SetImage( | 794 selected_keyword_view_->SetImage( |
| 795 *rb.GetImageSkiaNamed(IDR_OMNIBOX_SEARCH)); | 795 *rb.GetImageSkiaNamed(IDR_OMNIBOX_SEARCH)); |
| 796 selected_keyword_view_->set_is_extension_icon(false); | 796 selected_keyword_view_->set_is_extension_icon(false); |
| 797 } | 797 } |
| 798 } | 798 } |
| 799 } else if (show_keyword_hint) { | 799 } else if (show_keyword_hint) { |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1599 } | 1599 } |
| 1600 | 1600 |
| 1601 void LocationBarView::CleanupFadeAnimation() { | 1601 void LocationBarView::CleanupFadeAnimation() { |
| 1602 // Since we're no longer animating we don't need our layer. | 1602 // Since we're no longer animating we don't need our layer. |
| 1603 SetPaintToLayer(false); | 1603 SetPaintToLayer(false); |
| 1604 // Bubble labels don't need a transparent background anymore. | 1604 // Bubble labels don't need a transparent background anymore. |
| 1605 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1605 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1606 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1606 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1607 } | 1607 } |
| 1608 #endif // USE_AURA | 1608 #endif // USE_AURA |
| OLD | NEW |