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

Side by Side Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.h

Issue 2144903004: New location security strings and animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const gfx::FontList& font_list() const { return label_->font_list(); } 95 const gfx::FontList& font_list() const { return label_->font_list(); }
96 96
97 SkColor GetParentBackgroundColor() const; 97 SkColor GetParentBackgroundColor() const;
98 98
99 gfx::Size GetSizeForLabelWidth(int label_width) const; 99 gfx::Size GetSizeForLabelWidth(int label_width) const;
100 100
101 // Returns the minimum width the view can be to show the complete image when 101 // Returns the minimum width the view can be to show the complete image when
102 // the background is showing. 102 // the background is showing.
103 int MinimumWidthForImageWithBackgroundShown() const; 103 int MinimumWidthForImageWithBackgroundShown() const;
104 104
105 virtual int GetLabelPreferredWidth() const;
Peter Kasting 2016/07/19 21:17:20 Nit: Place up with other virtual functions for whi
Kevin Bailey 2016/08/12 18:49:14 Removed. It was something I added, that turned out
106
105 private: 107 private:
106 // Sets a background color on |label_| based on |chip_background_color| and 108 // Sets a background color on |label_| based on |chip_background_color| and
107 // the parent's bg color. 109 // the parent's bg color.
108 void SetLabelBackgroundColor(SkColor chip_background_color); 110 void SetLabelBackgroundColor(SkColor chip_background_color);
109 111
110 // Amount of padding from the leading edge of the view to the leading edge of 112 // Amount of padding from the leading edge of the view to the leading edge of
111 // the image (if |leading| is true), or from the trailing edge of the label 113 // the image (if |leading| is true), or from the trailing edge of the label
112 // (or image, if the label is invisible) to the trailing edge of the view. 114 // (or image, if the label is invisible) to the trailing edge of the view.
113 int GetOuterPadding(bool leading) const; 115 int GetOuterPadding(bool leading) const;
114 116
(...skipping 23 matching lines...) Expand all
138 // the native theme (so it responds to native theme updates). TODO(estade): 140 // the native theme (so it responds to native theme updates). TODO(estade):
139 // remove when MD is default. 141 // remove when MD is default.
140 SkColor parent_background_color_; 142 SkColor parent_background_color_;
141 143
142 bool should_show_background_; 144 bool should_show_background_;
143 145
144 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); 146 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView);
145 }; 147 };
146 148
147 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ 149 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698