Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 14259008: Instant Extended: Add prominent search term support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_->GetSearchTermsType() != ToolbarModel::NO_SEARCH_TERMS) {
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 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698