| 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_TRAY_BUBBLE_VIEW_H_ | 5 #ifndef UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
| 6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/views/bubble/bubble_delegate.h" | 9 #include "ui/views/bubble/bubble_delegate.h" |
| 10 #include "ui/views/views_export.h" | 10 #include "ui/views/views_export.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 AnchorType anchor_type; | 93 AnchorType anchor_type; |
| 94 AnchorAlignment anchor_alignment; | 94 AnchorAlignment anchor_alignment; |
| 95 int min_width; | 95 int min_width; |
| 96 int max_width; | 96 int max_width; |
| 97 int max_height; | 97 int max_height; |
| 98 bool can_activate; | 98 bool can_activate; |
| 99 bool close_on_deactivate; | 99 bool close_on_deactivate; |
| 100 SkColor arrow_color; | 100 SkColor arrow_color; |
| 101 views::BubbleBorder::ArrowLocation arrow_location; | 101 views::BubbleBorder::ArrowLocation arrow_location; |
| 102 int arrow_offset; | 102 int arrow_offset; |
| 103 bool hide_arrow; // hides arrow, but may still use "arrow geometry" | 103 views::BubbleBorder::ArrowPaintType arrow_paint_type; |
| 104 views::BubbleBorder::Shadow shadow; | 104 views::BubbleBorder::Shadow shadow; |
| 105 views::BubbleBorder::BubbleAlignment arrow_alignment; | 105 views::BubbleBorder::BubbleAlignment arrow_alignment; |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 // Constructs and returns a TrayBubbleView. init_params may be modified. | 108 // Constructs and returns a TrayBubbleView. init_params may be modified. |
| 109 static TrayBubbleView* Create(gfx::NativeView parent_window, | 109 static TrayBubbleView* Create(gfx::NativeView parent_window, |
| 110 views::View* anchor, | 110 views::View* anchor, |
| 111 Delegate* delegate, | 111 Delegate* delegate, |
| 112 InitParams* init_params); | 112 InitParams* init_params); |
| 113 | 113 |
| 114 virtual ~TrayBubbleView(); | 114 virtual ~TrayBubbleView(); |
| 115 | 115 |
| 116 // Sets up animations, and show the bubble. Must occur after CreateBubble() | 116 // Sets up animations, and show the bubble. Must occur after CreateBubble() |
| 117 // is called. | 117 // is called. |
| 118 void InitializeAndShowBubble(); | 118 void InitializeAndShowBubble(); |
| 119 | 119 |
| 120 // Called whenever the bubble size or location may have changed. | 120 // Called whenever the bubble size or location may have changed. |
| 121 void UpdateBubble(); | 121 void UpdateBubble(); |
| 122 | 122 |
| 123 // Sets the maximum bubble height and resizes the bubble. | 123 // Sets the maximum bubble height and resizes the bubble. |
| 124 void SetMaxHeight(int height); | 124 void SetMaxHeight(int height); |
| 125 | 125 |
| 126 // Sets the bubble width. | 126 // Sets the bubble width. |
| 127 void SetWidth(int width); | 127 void SetWidth(int width); |
| 128 | 128 |
| 129 // Sets whether or not to paint the bubble border arrow. | 129 // Sets whether or not to paint the bubble border arrow. |
| 130 void SetPaintArrow(bool paint_arrow); | 130 void SetArrowPaintType(views::BubbleBorder::ArrowPaintType arrow_paint_type); |
| 131 | 131 |
| 132 // Returns the border insets. Called by TrayEventFilter. | 132 // Returns the border insets. Called by TrayEventFilter. |
| 133 gfx::Insets GetBorderInsets() const; | 133 gfx::Insets GetBorderInsets() const; |
| 134 | 134 |
| 135 // Called when the delegate is destroyed. | 135 // Called when the delegate is destroyed. |
| 136 void reset_delegate() { delegate_ = NULL; } | 136 void reset_delegate() { delegate_ = NULL; } |
| 137 | 137 |
| 138 Delegate* delegate() { return delegate_; } | 138 Delegate* delegate() { return delegate_; } |
| 139 | 139 |
| 140 void set_gesture_dragging(bool dragging) { is_gesture_dragging_ = dragging; } | 140 void set_gesture_dragging(bool dragging) { is_gesture_dragging_ = dragging; } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 internal::TrayBubbleBorder* bubble_border_; | 179 internal::TrayBubbleBorder* bubble_border_; |
| 180 scoped_ptr<internal::TrayBubbleContentMask> bubble_content_mask_; | 180 scoped_ptr<internal::TrayBubbleContentMask> bubble_content_mask_; |
| 181 bool is_gesture_dragging_; | 181 bool is_gesture_dragging_; |
| 182 | 182 |
| 183 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); | 183 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); |
| 184 }; | 184 }; |
| 185 | 185 |
| 186 } // namespace views | 186 } // namespace views |
| 187 | 187 |
| 188 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 188 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
| OLD | NEW |