| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 // Amount of padding from the leading edge of the view to the leading edge of | 94 // Amount of padding from the leading edge of the view to the leading edge of |
| 95 // the image, and from the trailing edge of the label (or image, if the label | 95 // the image, and from the trailing edge of the label (or image, if the label |
| 96 // is invisible) to the trailing edge of the view. | 96 // is invisible) to the trailing edge of the view. |
| 97 int GetOuterPadding() const; | 97 int GetOuterPadding() const; |
| 98 | 98 |
| 99 // Spacing between the image and the label. | 99 // Spacing between the image and the label. |
| 100 int GetInternalSpacing() const; | 100 int GetInternalSpacing() const; |
| 101 | 101 |
| 102 // Returns the amount of space reserved for the separator in DIP. |
| 103 int GetSeparatorLayoutWidth() const; |
| 104 |
| 102 // Padding after the separator. | 105 // Padding after the separator. |
| 103 int GetPostSeparatorPadding() const; | 106 int GetPostSeparatorPadding() const; |
| 104 | 107 |
| 105 float GetScaleFactor() const; | 108 float GetScaleFactor() const; |
| 106 | 109 |
| 107 // views::View: | 110 // views::View: |
| 108 const char* GetClassName() const override; | 111 const char* GetClassName() const override; |
| 109 void OnPaint(gfx::Canvas* canvas) override; | 112 void OnPaint(gfx::Canvas* canvas) override; |
| 110 | 113 |
| 111 // The contents of the bubble. | 114 // The contents of the bubble. |
| 112 views::ImageView* image_; | 115 views::ImageView* image_; |
| 113 views::Label* label_; | 116 views::Label* label_; |
| 114 | 117 |
| 115 // The padding of the element that will be displayed after |this|. This value | 118 // The padding of the element that will be displayed after |this|. This value |
| 116 // is relevant for calculating the amount of space to reserve after the | 119 // is relevant for calculating the amount of space to reserve after the |
| 117 // separator. | 120 // separator. |
| 118 int next_element_interior_padding_ = 0; | 121 int next_element_interior_padding_ = 0; |
| 119 | 122 |
| 120 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); | 123 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); |
| 121 }; | 124 }; |
| 122 | 125 |
| 123 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ | 126 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ |
| OLD | NEW |