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

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

Issue 2028933002: Fix color of looking glass when searching on remote NTP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 858
859 void LocationBarView::RefreshLocationIcon() { 859 void LocationBarView::RefreshLocationIcon() {
860 // |omnibox_view_| may not be ready yet if Init() has not been called. The 860 // |omnibox_view_| may not be ready yet if Init() has not been called. The
861 // icon will be set soon by OnChanged(). 861 // icon will be set soon by OnChanged().
862 if (!omnibox_view_) 862 if (!omnibox_view_)
863 return; 863 return;
864 864
865 if (ui::MaterialDesignController::IsModeMaterial()) { 865 if (ui::MaterialDesignController::IsModeMaterial()) {
866 const int kIconSize = 16; 866 const int kIconSize = 16;
867 security_state::SecurityStateModel::SecurityLevel security_level = 867 security_state::SecurityStateModel::SecurityLevel security_level =
868 GetToolbarModel()->GetSecurityLevel(false); 868 GetToolbarModel()->GetSecurityLevel(false);
Evan Stade 2016/06/01 02:05:28 The annoying thing is that toolbar model already t
Peter Kasting 2016/06/01 03:18:02 I looked up the history of "editing or empty" (it
869 SkColor icon_color = 869 SkColor icon_color =
870 (security_level == security_state::SecurityStateModel::NONE) 870 omnibox_view_->IsEditingOrEmpty() ||
871 (security_level == security_state::SecurityStateModel::NONE)
871 ? color_utils::DeriveDefaultIconColor(GetColor(TEXT)) 872 ? color_utils::DeriveDefaultIconColor(GetColor(TEXT))
872 : GetSecureTextColor(security_level); 873 : GetSecureTextColor(security_level);
873 location_icon_view_->SetImage(gfx::CreateVectorIcon( 874 location_icon_view_->SetImage(gfx::CreateVectorIcon(
874 omnibox_view_->GetVectorIcon(), kIconSize, icon_color)); 875 omnibox_view_->GetVectorIcon(), kIconSize, icon_color));
875 } else { 876 } else {
876 location_icon_view_->SetImage( 877 location_icon_view_->SetImage(
877 *GetThemeProvider()->GetImageSkiaNamed(omnibox_view_->GetIcon())); 878 *GetThemeProvider()->GetImageSkiaNamed(omnibox_view_->GetIcon()));
878 } 879 }
879 } 880 }
880 881
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 // LocationBarView, private TemplateURLServiceObserver implementation: 1390 // LocationBarView, private TemplateURLServiceObserver implementation:
1390 1391
1391 void LocationBarView::OnTemplateURLServiceChanged() { 1392 void LocationBarView::OnTemplateURLServiceChanged() {
1392 template_url_service_->RemoveObserver(this); 1393 template_url_service_->RemoveObserver(this);
1393 template_url_service_ = nullptr; 1394 template_url_service_ = nullptr;
1394 // If the browser is no longer active, let's not show the info bubble, as this 1395 // If the browser is no longer active, let's not show the info bubble, as this
1395 // would make the browser the active window again. 1396 // would make the browser the active window again.
1396 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1397 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1397 ShowFirstRunBubble(); 1398 ShowFirstRunBubble();
1398 } 1399 }
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