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 UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ | 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ | 6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/views/background.h" | 10 #include "ui/views/background.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // Returns the corner radius of the current image set. | 156 // Returns the corner radius of the current image set. |
157 int GetBorderCornerRadius() const; | 157 int GetBorderCornerRadius() const; |
158 | 158 |
159 // Gets the arrow offset to use. | 159 // Gets the arrow offset to use. |
160 int GetArrowOffset(const gfx::Size& border_size) const; | 160 int GetArrowOffset(const gfx::Size& border_size) const; |
161 | 161 |
162 // Overridden from Border: | 162 // Overridden from Border: |
163 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE; | 163 virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE; |
164 virtual gfx::Insets GetInsets() const OVERRIDE; | 164 virtual gfx::Insets GetInsets() const OVERRIDE; |
| 165 virtual gfx::Size GetMinimumSize() const OVERRIDE; |
165 | 166 |
166 private: | 167 private: |
| 168 gfx::Size GetSizeForContentsSize(const gfx::Size& contents_size) const; |
167 gfx::ImageSkia* GetArrowImage() const; | 169 gfx::ImageSkia* GetArrowImage() const; |
168 gfx::Rect GetArrowRect(const gfx::Rect& bounds) const; | 170 gfx::Rect GetArrowRect(const gfx::Rect& bounds) const; |
169 void DrawArrow(gfx::Canvas* canvas, const gfx::Rect& arrow_bounds) const; | 171 void DrawArrow(gfx::Canvas* canvas, const gfx::Rect& arrow_bounds) const; |
170 | 172 |
171 Arrow arrow_; | 173 Arrow arrow_; |
172 int arrow_offset_; | 174 int arrow_offset_; |
173 ArrowPaintType arrow_paint_type_; | 175 ArrowPaintType arrow_paint_type_; |
174 BubbleAlignment alignment_; | 176 BubbleAlignment alignment_; |
175 Shadow shadow_; | 177 Shadow shadow_; |
176 internal::BorderImages* images_; | 178 internal::BorderImages* images_; |
(...skipping 13 matching lines...) Expand all Loading... |
190 | 192 |
191 private: | 193 private: |
192 BubbleBorder* border_; | 194 BubbleBorder* border_; |
193 | 195 |
194 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); | 196 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); |
195 }; | 197 }; |
196 | 198 |
197 } // namespace views | 199 } // namespace views |
198 | 200 |
199 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ | 201 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
OLD | NEW |