| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 const char* GetClassName() const override; | 116 const char* GetClassName() const override; |
| 117 void OnPaint(gfx::Canvas* canvas) override; | 117 void OnPaint(gfx::Canvas* canvas) override; |
| 118 | 118 |
| 119 // For painting the background. TODO(estade): remove post MD launch. | 119 // For painting the background. TODO(estade): remove post MD launch. |
| 120 std::unique_ptr<views::Painter> background_painter_; | 120 std::unique_ptr<views::Painter> background_painter_; |
| 121 | 121 |
| 122 // The contents of the bubble. | 122 // The contents of the bubble. |
| 123 views::ImageView* image_; | 123 views::ImageView* image_; |
| 124 views::Label* label_; | 124 views::Label* label_; |
| 125 | 125 |
| 126 // How much horizontal padding (fully-transparent columns) is inside the | |
| 127 // image. These are subtracted from the desired padding values when | |
| 128 // calculating the padding around the image, so that the image always appears | |
| 129 // to have the same visible padding no matter what its composition is. Only | |
| 130 // used in MD. | |
| 131 int builtin_leading_padding_; | |
| 132 int builtin_trailing_padding_; | |
| 133 | |
| 134 bool is_extension_icon_; | 126 bool is_extension_icon_; |
| 135 | 127 |
| 136 // This is only used in pre-MD. In MD, the background color is derived from | 128 // This is only used in pre-MD. In MD, the background color is derived from |
| 137 // the native theme (so it responds to native theme updates). TODO(estade): | 129 // the native theme (so it responds to native theme updates). TODO(estade): |
| 138 // remove when MD is default. | 130 // remove when MD is default. |
| 139 SkColor parent_background_color_; | 131 SkColor parent_background_color_; |
| 140 | 132 |
| 141 bool should_show_background_; | 133 bool should_show_background_; |
| 142 | 134 |
| 143 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); | 135 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); |
| 144 }; | 136 }; |
| 145 | 137 |
| 146 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ | 138 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ |
| OLD | NEW |