| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/views/bubble/bubble_delegate.h" | 10 #include "ui/views/bubble/bubble_delegate.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 int min_width, | 96 int min_width, |
| 97 int max_width); | 97 int max_width); |
| 98 InitParams(const InitParams& other); | 98 InitParams(const InitParams& other); |
| 99 AnchorType anchor_type; | 99 AnchorType anchor_type; |
| 100 AnchorAlignment anchor_alignment; | 100 AnchorAlignment anchor_alignment; |
| 101 int min_width; | 101 int min_width; |
| 102 int max_width; | 102 int max_width; |
| 103 int max_height; | 103 int max_height; |
| 104 bool can_activate; | 104 bool can_activate; |
| 105 bool close_on_deactivate; | 105 bool close_on_deactivate; |
| 106 // When true the bubble starts event capture when it opens and closes itself | |
| 107 // on mouse events outside its bounds. Used on mus. Can be combined with | |
| 108 // close_on_deactivate. Defaults to false. | |
| 109 bool close_via_capture; | |
| 110 SkColor arrow_color; | 106 SkColor arrow_color; |
| 111 bool first_item_has_no_margin; | 107 bool first_item_has_no_margin; |
| 112 views::BubbleBorder::Arrow arrow; | 108 views::BubbleBorder::Arrow arrow; |
| 113 int arrow_offset; | 109 int arrow_offset; |
| 114 views::BubbleBorder::ArrowPaintType arrow_paint_type; | 110 views::BubbleBorder::ArrowPaintType arrow_paint_type; |
| 115 views::BubbleBorder::Shadow shadow; | 111 views::BubbleBorder::Shadow shadow; |
| 116 views::BubbleBorder::BubbleAlignment arrow_alignment; | 112 views::BubbleBorder::BubbleAlignment arrow_alignment; |
| 117 }; | 113 }; |
| 118 | 114 |
| 119 // Constructs and returns a TrayBubbleView. init_params may be modified. | 115 // Constructs and returns a TrayBubbleView. init_params may be modified. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 bool WidgetHasHitTestMask() const override; | 154 bool WidgetHasHitTestMask() const override; |
| 159 void GetWidgetHitTestMask(gfx::Path* mask) const override; | 155 void GetWidgetHitTestMask(gfx::Path* mask) const override; |
| 160 | 156 |
| 161 // Overridden from views::BubbleDelegateView. | 157 // Overridden from views::BubbleDelegateView. |
| 162 gfx::Rect GetAnchorRect() const override; | 158 gfx::Rect GetAnchorRect() const override; |
| 163 | 159 |
| 164 // Overridden from views::View. | 160 // Overridden from views::View. |
| 165 gfx::Size GetPreferredSize() const override; | 161 gfx::Size GetPreferredSize() const override; |
| 166 gfx::Size GetMaximumSize() const override; | 162 gfx::Size GetMaximumSize() const override; |
| 167 int GetHeightForWidth(int width) const override; | 163 int GetHeightForWidth(int width) const override; |
| 168 bool OnMousePressed(const ui::MouseEvent& event) override; | |
| 169 void OnMouseCaptureLost() override; | |
| 170 void OnMouseEntered(const ui::MouseEvent& event) override; | 164 void OnMouseEntered(const ui::MouseEvent& event) override; |
| 171 void OnMouseExited(const ui::MouseEvent& event) override; | 165 void OnMouseExited(const ui::MouseEvent& event) override; |
| 172 void GetAccessibleState(ui::AXViewState* state) override; | 166 void GetAccessibleState(ui::AXViewState* state) override; |
| 173 | 167 |
| 174 // Overridden from MouseWatcherListener | 168 // Overridden from MouseWatcherListener |
| 175 void MouseMovedOutOfHost() override; | 169 void MouseMovedOutOfHost() override; |
| 176 | 170 |
| 177 protected: | 171 protected: |
| 178 TrayBubbleView(gfx::NativeView parent_window, | 172 TrayBubbleView(gfx::NativeView parent_window, |
| 179 views::View* anchor, | 173 views::View* anchor, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 205 | 199 |
| 206 // Used to find any mouse movements. | 200 // Used to find any mouse movements. |
| 207 scoped_ptr<MouseWatcher> mouse_watcher_; | 201 scoped_ptr<MouseWatcher> mouse_watcher_; |
| 208 | 202 |
| 209 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); | 203 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); |
| 210 }; | 204 }; |
| 211 | 205 |
| 212 } // namespace views | 206 } // namespace views |
| 213 | 207 |
| 214 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 208 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
| OLD | NEW |