| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // Gets the arrow offset to use. | 198 // Gets the arrow offset to use. |
| 199 int GetArrowOffset(const gfx::Size& border_size) const; | 199 int GetArrowOffset(const gfx::Size& border_size) const; |
| 200 | 200 |
| 201 // Retreives the arrow path given |view_bounds|. |view_bounds| should be local | 201 // Retreives the arrow path given |view_bounds|. |view_bounds| should be local |
| 202 // bounds of the view. | 202 // bounds of the view. |
| 203 // Returns false if |path| is unchanged, which is the case when there is no | 203 // Returns false if |path| is unchanged, which is the case when there is no |
| 204 // painted arrow. | 204 // painted arrow. |
| 205 // The returned path does not account for arrow stroke and shadow. | 205 // The returned path does not account for arrow stroke and shadow. |
| 206 bool GetArrowPath(const gfx::Rect& view_bounds, gfx::Path* path) const; | 206 bool GetArrowPath(const gfx::Rect& view_bounds, gfx::Path* path) const; |
| 207 | 207 |
| 208 // Sets border thickness overriding the thickness set on |images_| creation. |
| 209 // May only be invoked after |arrow_paint_type_| has been set. |
| 210 void SetBorderInteriorThickness(int border_interior_thickness); |
| 211 |
| 208 // Overridden from Border: | 212 // Overridden from Border: |
| 209 void Paint(const View& view, gfx::Canvas* canvas) override; | 213 void Paint(const View& view, gfx::Canvas* canvas) override; |
| 210 gfx::Insets GetInsets() const override; | 214 gfx::Insets GetInsets() const override; |
| 211 gfx::Size GetMinimumSize() const override; | 215 gfx::Size GetMinimumSize() const override; |
| 212 | 216 |
| 213 private: | 217 private: |
| 214 FRIEND_TEST_ALL_PREFIXES(BubbleBorderTest, GetSizeForContentsSizeTest); | 218 FRIEND_TEST_ALL_PREFIXES(BubbleBorderTest, GetSizeForContentsSizeTest); |
| 215 FRIEND_TEST_ALL_PREFIXES(BubbleBorderTest, GetBoundsOriginTest); | 219 FRIEND_TEST_ALL_PREFIXES(BubbleBorderTest, GetBoundsOriginTest); |
| 216 FRIEND_TEST_ALL_PREFIXES(BubbleBorderTest, ShadowTypes); | 220 FRIEND_TEST_ALL_PREFIXES(BubbleBorderTest, ShadowTypes); |
| 217 | 221 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 | 254 |
| 251 private: | 255 private: |
| 252 BubbleBorder* border_; | 256 BubbleBorder* border_; |
| 253 | 257 |
| 254 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); | 258 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); |
| 255 }; | 259 }; |
| 256 | 260 |
| 257 } // namespace views | 261 } // namespace views |
| 258 | 262 |
| 259 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ | 263 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
| OLD | NEW |