| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_BUBBLE_BORDER_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_BUBBLE_BORDER_H_ |
| 6 #define CHROME_BROWSER_VIEWS_BUBBLE_BORDER_H_ | 6 #define CHROME_BROWSER_VIEWS_BUBBLE_BORDER_H_ |
| 7 | 7 |
| 8 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
| 9 #include "views/background.h" | 9 #include "views/background.h" |
| 10 #include "views/border.h" | 10 #include "views/border.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // 2 bit specifies horizontal or vertical. | 21 // 2 bit specifies horizontal or vertical. |
| 22 enum ArrowLocation { | 22 enum ArrowLocation { |
| 23 TOP_LEFT = 0, | 23 TOP_LEFT = 0, |
| 24 TOP_RIGHT = 1, | 24 TOP_RIGHT = 1, |
| 25 BOTTOM_LEFT = 2, | 25 BOTTOM_LEFT = 2, |
| 26 BOTTOM_RIGHT = 3, | 26 BOTTOM_RIGHT = 3, |
| 27 LEFT_TOP = 4, | 27 LEFT_TOP = 4, |
| 28 RIGHT_TOP = 5, | 28 RIGHT_TOP = 5, |
| 29 LEFT_BOTTOM = 6, | 29 LEFT_BOTTOM = 6, |
| 30 RIGHT_BOTTOM = 7, | 30 RIGHT_BOTTOM = 7, |
| 31 NONE = 8, // No arrow and top border. Aligned under the supplied rect. | 31 NONE = 8, // No arrow. Positioned under the supplied rect. |
| 32 FLOAT = 9 // No arrow but has top edge. Centered over the supplied rect. | 32 FLOAT = 9 // No arrow. Centered over the supplied rect. |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 explicit BubbleBorder(ArrowLocation arrow_location) | 35 explicit BubbleBorder(ArrowLocation arrow_location) |
| 36 : override_arrow_offset_(0), | 36 : override_arrow_offset_(0), |
| 37 arrow_location_(arrow_location), | 37 arrow_location_(arrow_location), |
| 38 background_color_(SK_ColorWHITE) { | 38 background_color_(SK_ColorWHITE) { |
| 39 InitClass(); | 39 InitClass(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Returns the radius of the corner of the border. | 42 // Returns the radius of the corner of the border. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // Background overrides. | 162 // Background overrides. |
| 163 virtual void Paint(gfx::Canvas* canvas, views::View* view) const; | 163 virtual void Paint(gfx::Canvas* canvas, views::View* view) const; |
| 164 | 164 |
| 165 private: | 165 private: |
| 166 BubbleBorder* border_; | 166 BubbleBorder* border_; |
| 167 | 167 |
| 168 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); | 168 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 #endif // CHROME_BROWSER_VIEWS_BUBBLE_BORDER_H_ | 171 #endif // CHROME_BROWSER_VIEWS_BUBBLE_BORDER_H_ |
| OLD | NEW |