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

Side by Side Diff: chrome/browser/ui/views/location_bar/selected_keyword_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
« 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/selected_keyword_view.h" 5 #include "chrome/browser/ui/views/location_bar/selected_keyword_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/search_engines/template_url_service_factory.h" 9 #include "chrome/browser/search_engines/template_url_service_factory.h"
10 #include "chrome/browser/ui/location_bar/location_bar_util.h" 10 #include "chrome/browser/ui/location_bar/location_bar_util.h"
(...skipping 13 matching lines...) Expand all
24 full_label_.SetFontList(font_list); 24 full_label_.SetFontList(font_list);
25 full_label_.SetVisible(false); 25 full_label_.SetVisible(false);
26 partial_label_.SetFontList(font_list); 26 partial_label_.SetFontList(font_list);
27 partial_label_.SetVisible(false); 27 partial_label_.SetVisible(false);
28 } 28 }
29 29
30 SelectedKeywordView::~SelectedKeywordView() { 30 SelectedKeywordView::~SelectedKeywordView() {
31 } 31 }
32 32
33 void SelectedKeywordView::ResetImage() { 33 void SelectedKeywordView::ResetImage() {
34 SetImage( 34 SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_SEARCH, 16,
Peter Kasting 2016/10/05 00:02:14 Nit: Should this be LocationBarView::kLocationBarI
Evan Stade 2016/10/05 17:29:43 Done.
35 gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_SEARCH, GetTextColor())); 35 GetTextColor()));
36 } 36 }
37 37
38 SkColor SelectedKeywordView::GetTextColor() const { 38 SkColor SelectedKeywordView::GetTextColor() const {
39 return GetNativeTheme()->GetSystemColor( 39 return GetNativeTheme()->GetSystemColor(
40 color_utils::IsDark(GetParentBackgroundColor()) 40 color_utils::IsDark(GetParentBackgroundColor())
41 ? ui::NativeTheme::kColorId_TextfieldDefaultColor 41 ? ui::NativeTheme::kColorId_TextfieldDefaultColor
42 : ui::NativeTheme::kColorId_LinkEnabled); 42 : ui::NativeTheme::kColorId_LinkEnabled);
43 } 43 }
44 44
45 gfx::Size SelectedKeywordView::GetPreferredSize() const { 45 gfx::Size SelectedKeywordView::GetPreferredSize() const {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Update the label now so ShouldShowLabel() works correctly when the parent 89 // Update the label now so ShouldShowLabel() works correctly when the parent
90 // class is calculating the preferred size. It will be updated again in 90 // class is calculating the preferred size. It will be updated again in
91 // Layout(), taking into account how much space has actually been allotted. 91 // Layout(), taking into account how much space has actually been allotted.
92 SetLabel(full_name); 92 SetLabel(full_name);
93 } 93 }
94 94
95 const char* SelectedKeywordView::GetClassName() const { 95 const char* SelectedKeywordView::GetClassName() const {
96 return "SelectedKeywordView"; 96 return "SelectedKeywordView";
97 } 97 }
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