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 14 matching lines...) Expand all Loading... | |
25 class Label; | 25 class Label; |
26 class Painter; | 26 class Painter; |
27 } | 27 } |
28 | 28 |
29 // View used to draw a bubble, containing an icon and a label. We use this as a | 29 // View used to draw a bubble, containing an icon and a label. We use this as a |
30 // base for the classes that handle the location icon (including the EV bubble), | 30 // base for the classes that handle the location icon (including the EV bubble), |
31 // tab-to-search UI, and content settings. | 31 // tab-to-search UI, and content settings. |
32 class IconLabelBubbleView : public views::InkDropHostView { | 32 class IconLabelBubbleView : public views::InkDropHostView { |
33 public: | 33 public: |
34 static constexpr int kTrailingPaddingPreMd = 2; | 34 static constexpr int kTrailingPaddingPreMd = 2; |
35 static constexpr int kOpenTimeMS = 150; | |
Peter Kasting
2016/08/18 06:24:37
Nit: Should be protected, and can be defined in th
Kevin Bailey
2016/08/18 16:09:36
Made protected, but what's the advantage of moving
Peter Kasting
2016/08/20 01:16:43
Not much, don't worry about it.
| |
35 | 36 |
36 IconLabelBubbleView(int contained_image, | 37 IconLabelBubbleView(int contained_image, |
37 const gfx::FontList& font_list, | 38 const gfx::FontList& font_list, |
38 SkColor parent_background_color, | 39 SkColor parent_background_color, |
39 bool elide_in_middle); | 40 bool elide_in_middle); |
40 ~IconLabelBubbleView() override; | 41 ~IconLabelBubbleView() override; |
41 | 42 |
42 // Sets a background that paints |background_images| in a scalable grid. | 43 // Sets a background that paints |background_images| in a scalable grid. |
43 // Subclasses must call this during construction. | 44 // Subclasses must call this during construction. |
44 void SetBackgroundImageGrid(const int background_images[]); | 45 void SetBackgroundImageGrid(const int background_images[]); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 // the native theme (so it responds to native theme updates). TODO(estade): | 139 // the native theme (so it responds to native theme updates). TODO(estade): |
139 // remove when MD is default. | 140 // remove when MD is default. |
140 SkColor parent_background_color_; | 141 SkColor parent_background_color_; |
141 | 142 |
142 bool should_show_background_; | 143 bool should_show_background_; |
143 | 144 |
144 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); | 145 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); |
145 }; | 146 }; |
146 | 147 |
147 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ | 148 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ |
OLD | NEW |