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_2_H_ | 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_BORDER_2_H_ |
6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_2_H_ | 6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_2_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/gfx/shadow_value.h" | 10 #include "ui/gfx/shadow_value.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 void set_arrow_width(int arrow_width) { arrow_width_ = arrow_width; } | 44 void set_arrow_width(int arrow_width) { arrow_width_ = arrow_width; } |
45 int arrow_width() const { return arrow_width_; } | 45 int arrow_width() const { return arrow_width_; } |
46 | 46 |
47 void SetShadow(gfx::ShadowValue shadow); | 47 void SetShadow(gfx::ShadowValue shadow); |
48 | 48 |
49 // views::BubbleBorder overrides: | 49 // views::BubbleBorder overrides: |
50 virtual int GetBorderThickness() const OVERRIDE; | 50 virtual int GetBorderThickness() const OVERRIDE; |
51 | 51 |
52 protected: | 52 protected: |
53 void PaintBackground(gfx::Canvas* canvas, | 53 virtual void PaintBackground(gfx::Canvas* canvas, |
54 const gfx::Rect& bounds) const; | 54 const gfx::Rect& bounds) const; |
55 | 55 |
56 private: | 56 private: |
57 // Gets arrow offset based on arrow location and |offset_|. | 57 // Gets arrow offset based on arrow location and |offset_|. |
58 int GetArrowOffset() const; | 58 int GetArrowOffset() const; |
59 | 59 |
60 // views::BubbleBorder overrides: | 60 // views::BubbleBorder overrides: |
61 virtual void GetInsets(gfx::Insets* insets) const OVERRIDE; | 61 virtual void GetInsets(gfx::Insets* insets) const OVERRIDE; |
62 virtual gfx::Rect GetBounds(const gfx::Rect& position_relative_to, | 62 virtual gfx::Rect GetBounds(const gfx::Rect& position_relative_to, |
63 const gfx::Size& contents_size) const OVERRIDE; | 63 const gfx::Size& contents_size) const OVERRIDE; |
64 virtual void GetInsetsForArrowLocation( | 64 virtual void GetInsetsForArrowLocation( |
(...skipping 17 matching lines...) Expand all Loading... |
82 gfx::Point offset_; | 82 gfx::Point offset_; |
83 | 83 |
84 gfx::ShadowValues shadows_; | 84 gfx::ShadowValues shadows_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(BubbleBorder2); | 86 DISALLOW_COPY_AND_ASSIGN(BubbleBorder2); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace views | 89 } // namespace views |
90 | 90 |
91 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_2_H_ | 91 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_2_H_ |
OLD | NEW |