| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 | 780 |
| 781 void LocationBarViewMac::UpdatePlusDecorationVisibility() { | 781 void LocationBarViewMac::UpdatePlusDecorationVisibility() { |
| 782 if (extensions::FeatureSwitch::action_box()->IsEnabled()) { | 782 if (extensions::FeatureSwitch::action_box()->IsEnabled()) { |
| 783 // If the action box is enabled, hide it when input is in progress. | 783 // If the action box is enabled, hide it when input is in progress. |
| 784 plus_decoration_->SetVisible(!toolbar_model_->GetInputInProgress()); | 784 plus_decoration_->SetVisible(!toolbar_model_->GetInputInProgress()); |
| 785 } | 785 } |
| 786 } | 786 } |
| 787 | 787 |
| 788 string16 LocationBarViewMac::GetSearchProviderName() const { | 788 string16 LocationBarViewMac::GetSearchProviderName() const { |
| 789 if (!toolbar_model_->GetInputInProgress() && | 789 if (!toolbar_model_->GetInputInProgress() && |
| 790 toolbar_model_->WouldReplaceSearchURLWithSearchTerms()) { | 790 toolbar_model_->GetSearchTermType() != ToolbarModel::SEARCH_TERM_NONE) { |
| 791 const TemplateURL* template_url = | 791 const TemplateURL* template_url = |
| 792 TemplateURLServiceFactory::GetForProfile(profile_)-> | 792 TemplateURLServiceFactory::GetForProfile(profile_)-> |
| 793 GetDefaultSearchProvider(); | 793 GetDefaultSearchProvider(); |
| 794 if (template_url) | 794 if (template_url) |
| 795 return template_url->short_name(); | 795 return template_url->short_name(); |
| 796 } | 796 } |
| 797 return string16(); | 797 return string16(); |
| 798 } | 798 } |
| OLD | NEW |