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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2702463004: Re-display chrome:// page location icon label after aborted search (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 return extension_name; 867 return extension_name;
868 868
869 bool has_ev_cert = 869 bool has_ev_cert =
870 (GetToolbarModel()->GetSecurityLevel(false) == security_state::EV_SECURE); 870 (GetToolbarModel()->GetSecurityLevel(false) == security_state::EV_SECURE);
871 return has_ev_cert ? GetToolbarModel()->GetEVCertName() 871 return has_ev_cert ? GetToolbarModel()->GetEVCertName()
872 : GetToolbarModel()->GetSecureVerboseText(); 872 : GetToolbarModel()->GetSecureVerboseText();
873 } 873 }
874 874
875 bool LocationBarView::ShouldShowKeywordBubble() const { 875 bool LocationBarView::ShouldShowKeywordBubble() const {
876 return !omnibox_view_->model()->keyword().empty() && 876 return !omnibox_view_->model()->keyword().empty() &&
877 !omnibox_view_->model()->is_keyword_hint(); 877 !omnibox_view_->model()->is_keyword_hint();
878 } 878 }
879 879
880 bool LocationBarView::ShouldShowLocationIconText() const { 880 bool LocationBarView::ShouldShowLocationIconText() const {
881 if (!GetOmniboxView()->IsEditingOrEmpty() && 881 if (!GetToolbarModel()->input_in_progress() &&
882 (GetToolbarModel()->GetURL().SchemeIs(content::kChromeUIScheme) || 882 (GetToolbarModel()->GetURL().SchemeIs(content::kChromeUIScheme) ||
883 GetToolbarModel()->GetURL().SchemeIs(extensions::kExtensionScheme))) 883 GetToolbarModel()->GetURL().SchemeIs(extensions::kExtensionScheme)))
884 return true; 884 return true;
885 885
886 using SecurityLevel = security_state::SecurityLevel; 886 using SecurityLevel = security_state::SecurityLevel;
887 const SecurityLevel level = GetToolbarModel()->GetSecurityLevel(false); 887 const SecurityLevel level = GetToolbarModel()->GetSecurityLevel(false);
888 return level == SecurityLevel::EV_SECURE || level == SecurityLevel::SECURE || 888 return level == SecurityLevel::EV_SECURE || level == SecurityLevel::SECURE ||
889 level == SecurityLevel::DANGEROUS || 889 level == SecurityLevel::DANGEROUS ||
890 level == SecurityLevel::HTTP_SHOW_WARNING; 890 level == SecurityLevel::HTTP_SHOW_WARNING;
891 } 891 }
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 // LocationBarView, private TemplateURLServiceObserver implementation: 1195 // LocationBarView, private TemplateURLServiceObserver implementation:
1196 1196
1197 void LocationBarView::OnTemplateURLServiceChanged() { 1197 void LocationBarView::OnTemplateURLServiceChanged() {
1198 template_url_service_->RemoveObserver(this); 1198 template_url_service_->RemoveObserver(this);
1199 template_url_service_ = nullptr; 1199 template_url_service_ = nullptr;
1200 // If the browser is no longer active, let's not show the info bubble, as this 1200 // If the browser is no longer active, let's not show the info bubble, as this
1201 // would make the browser the active window again. 1201 // would make the browser the active window again.
1202 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1202 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1203 ShowFirstRunBubble(); 1203 ShowFirstRunBubble();
1204 } 1204 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698