| 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/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 // Amount of padding at the edges of the bubble. If |by_icon| is true, this | 61 // Amount of padding at the edges of the bubble. If |by_icon| is true, this |
| 62 // is the padding next to the icon; otherwise it's the padding next to the | 62 // is the padding next to the icon; otherwise it's the padding next to the |
| 63 // label. (We increase padding next to the label by the amount of padding | 63 // label. (We increase padding next to the label by the amount of padding |
| 64 // "built in" to the icon in order to make the bubble appear to have | 64 // "built in" to the icon in order to make the bubble appear to have |
| 65 // symmetrical padding.) | 65 // symmetrical padding.) |
| 66 static int GetBubbleOuterPadding(bool by_icon); | 66 static int GetBubbleOuterPadding(bool by_icon); |
| 67 | 67 |
| 68 // views::View: | 68 // views::View: |
| 69 const char* GetClassName() const override; |
| 69 void OnPaint(gfx::Canvas* canvas) override; | 70 void OnPaint(gfx::Canvas* canvas) override; |
| 70 | 71 |
| 71 int GetPreLabelWidth() const; | 72 int GetPreLabelWidth() const; |
| 72 | 73 |
| 73 // For painting the background. | 74 // For painting the background. |
| 74 scoped_ptr<views::Painter> background_painter_; | 75 scoped_ptr<views::Painter> background_painter_; |
| 75 scoped_ptr<views::Painter> hover_background_painter_; | 76 scoped_ptr<views::Painter> hover_background_painter_; |
| 76 | 77 |
| 77 // The contents of the bubble. | 78 // The contents of the bubble. |
| 78 views::ImageView* image_; | 79 views::ImageView* image_; |
| 79 views::Label* label_; | 80 views::Label* label_; |
| 80 | 81 |
| 81 bool is_extension_icon_; | 82 bool is_extension_icon_; |
| 82 bool in_hover_; | 83 bool in_hover_; |
| 83 | 84 |
| 84 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); | 85 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ | 88 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ |
| OLD | NEW |