| OLD | NEW |
| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 virtual double WidthMultiplier() const; | 71 virtual double WidthMultiplier() const; |
| 72 | 72 |
| 73 // Returns the amount of horizontal space needed to draw the image and its | 73 // Returns the amount of horizontal space needed to draw the image and its |
| 74 // padding before the label. | 74 // padding before the label. |
| 75 virtual int GetImageAndPaddingWidth() const; | 75 virtual int GetImageAndPaddingWidth() const; |
| 76 | 76 |
| 77 // views::View: | 77 // views::View: |
| 78 gfx::Size GetPreferredSize() const override; | 78 gfx::Size GetPreferredSize() const override; |
| 79 void Layout() override; | 79 void Layout() override; |
| 80 void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override; | 80 void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override; |
| 81 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 82 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
| 83 scoped_ptr<views::InkDropHover> CreateInkDropHover() const override; |
| 84 SkColor GetInkDropBaseColor() const override; |
| 81 | 85 |
| 82 const gfx::FontList& font_list() const { return label_->font_list(); } | 86 const gfx::FontList& font_list() const { return label_->font_list(); } |
| 83 | 87 |
| 84 SkColor GetParentBackgroundColor() const; | 88 SkColor GetParentBackgroundColor() const; |
| 85 | 89 |
| 86 gfx::Size GetSizeForLabelWidth(int width) const; | 90 gfx::Size GetSizeForLabelWidth(int width) const; |
| 87 | 91 |
| 88 private: | 92 private: |
| 89 // Sets a background color on |label_| based on |chip_background_color| and | 93 // Sets a background color on |label_| based on |chip_background_color| and |
| 90 // the parent's bg color. | 94 // the parent's bg color. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 115 // the native theme (so it responds to native theme updates). TODO(estade): | 119 // the native theme (so it responds to native theme updates). TODO(estade): |
| 116 // remove when MD is default. | 120 // remove when MD is default. |
| 117 SkColor parent_background_color_; | 121 SkColor parent_background_color_; |
| 118 | 122 |
| 119 bool should_show_background_; | 123 bool should_show_background_; |
| 120 | 124 |
| 121 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); | 125 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); |
| 122 }; | 126 }; |
| 123 | 127 |
| 124 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ | 128 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ |
| OLD | NEW |