| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 // Overridden from Border: | 117 // Overridden from Border: |
| 118 virtual void GetInsets(gfx::Insets* insets) const OVERRIDE; | 118 virtual void GetInsets(gfx::Insets* insets) const OVERRIDE; |
| 119 | 119 |
| 120 // How many pixels the bubble border is from the edge of the images. | 120 // How many pixels the bubble border is from the edge of the images. |
| 121 int border_thickness() const; | 121 int border_thickness() const; |
| 122 | 122 |
| 123 protected: | 123 protected: |
| 124 virtual ~BubbleBorder(); | 124 virtual ~BubbleBorder(); |
| 125 | 125 |
| 126 // Calculates the insets for a specific arrow location. Normally called from |
| 127 // GetInsets(arrow_location()), but may be called by specialized BubbleBorder |
| 128 // implementations. |
| 129 void GetInsetsForArrowLocation(gfx::Insets* insets, |
| 130 ArrowLocation arrow_loc) const; |
| 131 |
| 126 private: | 132 private: |
| 127 struct BorderImages; | 133 struct BorderImages; |
| 128 | 134 |
| 129 // Loads images if necessary. | 135 // Loads images if necessary. |
| 130 static BorderImages* GetBorderImages(Shadow shadow); | 136 static BorderImages* GetBorderImages(Shadow shadow); |
| 131 | 137 |
| 132 // Overridden from Border: | 138 // Overridden from Border: |
| 133 virtual void Paint(const View& view, | 139 virtual void Paint(const View& view, |
| 134 gfx::Canvas* canvas) const OVERRIDE; | 140 gfx::Canvas* canvas) const OVERRIDE; |
| 135 | 141 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 186 |
| 181 private: | 187 private: |
| 182 BubbleBorder* border_; | 188 BubbleBorder* border_; |
| 183 | 189 |
| 184 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); | 190 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); |
| 185 }; | 191 }; |
| 186 | 192 |
| 187 } // namespace views | 193 } // namespace views |
| 188 | 194 |
| 189 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ | 195 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
| OLD | NEW |