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

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

Issue 2389073004: Restore correct size for omnibox search icon. (Closed)
Patch Set: . Created 4 years, 2 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
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/command_line.h" 10 #include "base/command_line.h"
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 if (!omnibox_view_) 820 if (!omnibox_view_)
821 return; 821 return;
822 822
823 security_state::SecurityStateModel::SecurityLevel security_level = 823 security_state::SecurityStateModel::SecurityLevel security_level =
824 GetToolbarModel()->GetSecurityLevel(false); 824 GetToolbarModel()->GetSecurityLevel(false);
825 SkColor icon_color = 825 SkColor icon_color =
826 (security_level == security_state::SecurityStateModel::NONE) 826 (security_level == security_state::SecurityStateModel::NONE)
827 ? color_utils::DeriveDefaultIconColor(GetColor(TEXT)) 827 ? color_utils::DeriveDefaultIconColor(GetColor(TEXT))
828 : GetSecureTextColor(security_level); 828 : GetSecureTextColor(security_level);
829 location_icon_view_->SetImage(gfx::CreateVectorIcon( 829 location_icon_view_->SetImage(gfx::CreateVectorIcon(
830 omnibox_view_->GetVectorIcon(), kLocationBarIconWidth, icon_color)); 830 omnibox_view_->GetVectorIcon(), kIconWidth, icon_color));
831 } 831 }
832 832
833 bool LocationBarView::RefreshContentSettingViews() { 833 bool LocationBarView::RefreshContentSettingViews() {
834 bool visibility_changed = false; 834 bool visibility_changed = false;
835 for (ContentSettingViews::const_iterator i(content_setting_views_.begin()); 835 for (ContentSettingViews::const_iterator i(content_setting_views_.begin());
836 i != content_setting_views_.end(); ++i) { 836 i != content_setting_views_.end(); ++i) {
837 const bool was_visible = (*i)->visible(); 837 const bool was_visible = (*i)->visible();
838 (*i)->Update(GetToolbarModel()->input_in_progress() ? nullptr 838 (*i)->Update(GetToolbarModel()->input_in_progress() ? nullptr
839 : GetWebContents()); 839 : GetWebContents());
840 if (was_visible != (*i)->visible()) 840 if (was_visible != (*i)->visible())
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 // LocationBarView, private TemplateURLServiceObserver implementation: 1327 // LocationBarView, private TemplateURLServiceObserver implementation:
1328 1328
1329 void LocationBarView::OnTemplateURLServiceChanged() { 1329 void LocationBarView::OnTemplateURLServiceChanged() {
1330 template_url_service_->RemoveObserver(this); 1330 template_url_service_->RemoveObserver(this);
1331 template_url_service_ = nullptr; 1331 template_url_service_ = nullptr;
1332 // If the browser is no longer active, let's not show the info bubble, as this 1332 // If the browser is no longer active, let's not show the info bubble, as this
1333 // would make the browser the active window again. 1333 // would make the browser the active window again.
1334 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1334 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1335 ShowFirstRunBubble(); 1335 ShowFirstRunBubble();
1336 } 1336 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698