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

Unified Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.h

Issue 1423263004: [MD] Use programmatic rendering for omnibox chips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
index 11b6672645b04c9209cd15fc3412a6dbbbac7a03..59cd80d23952d77addd20dcb4fb16d8d8ca05791 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
@@ -30,6 +30,7 @@ class Painter;
// content settings.
class IconLabelBubbleView : public views::View {
public:
+ // TODO(estade): remove |text_color| which is not used for MD.
IconLabelBubbleView(int contained_image,
const gfx::FontList& font_list,
SkColor text_color,
@@ -37,18 +38,17 @@ class IconLabelBubbleView : public views::View {
bool elide_in_middle);
~IconLabelBubbleView() override;
+ // Gets the color for displaying text.
+ virtual SkColor GetTextColor() const = 0;
+ // Gets the color for the border (a more transparent version of
+ // which is used for the background).
+ virtual SkColor GetBorderColor() const = 0;
+
// Sets a background that paints |background_images| in a scalable grid.
// Subclasses are required to call this or SetBackgroundImageWithInsets during
// construction.
void SetBackgroundImageGrid(const int background_images[]);
- // Divides the image designated by |background_image_id| into nine regions.
- // The four corners are specified by |insets|, the remainder are stretched to
- // fill the background. Subclasses are required to call this or
- // SetBackgroundImageGrid during construction.
- void SetBackgroundImageWithInsets(int background_image_id,
- gfx::Insets& insets);
-
void SetLabel(const base::string16& label);
void SetImage(const gfx::ImageSkia& image);
void set_is_extension_icon(bool is_extension_icon) {
@@ -70,6 +70,7 @@ class IconLabelBubbleView : public views::View {
// views::View:
gfx::Size GetPreferredSize() const override;
void Layout() override;
+ void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override;
const gfx::FontList& font_list() const { return label_->font_list(); }
@@ -91,7 +92,7 @@ class IconLabelBubbleView : public views::View {
const char* GetClassName() const override;
void OnPaint(gfx::Canvas* canvas) override;
- // For painting the background.
+ // For painting the background. TODO(estade): remove post MD launch.
scoped_ptr<views::Painter> background_painter_;
// The contents of the bubble.

Powered by Google App Engine
This is Rietveld 408576698