| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "views/background.h" | 9 #include "views/background.h" |
| 10 #include "views/border.h" | 10 #include "views/border.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 // Sets a fixed offset for the arrow from the beginning of corresponding edge. | 109 // Sets a fixed offset for the arrow from the beginning of corresponding edge. |
| 110 // The arrow will still point to the same location but the bubble will shift | 110 // The arrow will still point to the same location but the bubble will shift |
| 111 // location to make that happen. Returns actuall arrow offset, in case of | 111 // location to make that happen. Returns actuall arrow offset, in case of |
| 112 // overflow it differ from desired. | 112 // overflow it differ from desired. |
| 113 int SetArrowOffset(int offset, const gfx::Size& contents_size); | 113 int SetArrowOffset(int offset, const gfx::Size& contents_size); |
| 114 | 114 |
| 115 // Overridden from views::Border: | 115 // Overridden from views::Border: |
| 116 virtual void GetInsets(gfx::Insets* insets) const; | 116 virtual void GetInsets(gfx::Insets* insets) const; |
| 117 | 117 |
| 118 // How many pixels the bubble border is from the edge of the images. |
| 119 int pixels_to_border() const; |
| 120 |
| 118 private: | 121 private: |
| 119 struct BorderImages; | 122 struct BorderImages; |
| 120 | 123 |
| 121 // Loads images if necessary. | 124 // Loads images if necessary. |
| 122 static BorderImages* GetBorderImages(Shadow shadow); | 125 static BorderImages* GetBorderImages(Shadow shadow); |
| 123 | 126 |
| 124 virtual ~BubbleBorder(); | 127 virtual ~BubbleBorder(); |
| 125 | 128 |
| 126 // Overridden from views::Border: | 129 // Overridden from views::Border: |
| 127 virtual void Paint(const views::View& view, gfx::Canvas* canvas) const; | 130 virtual void Paint(const views::View& view, gfx::Canvas* canvas) const; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 177 |
| 175 private: | 178 private: |
| 176 BubbleBorder* border_; | 179 BubbleBorder* border_; |
| 177 | 180 |
| 178 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); | 181 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); |
| 179 }; | 182 }; |
| 180 | 183 |
| 181 } // namespace views | 184 } // namespace views |
| 182 | 185 |
| 183 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ | 186 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ |
| OLD | NEW |