Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DIALOG_DELEGATE_H_ | 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ |
| 6 #define UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ | 6 #define UI_VIEWS_BUBBLE_BUBBLE_DIALOG_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/views/bubble/bubble_border.h" | 10 #include "ui/views/bubble/bubble_border.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 bool accept_events() const { return accept_events_; } | 92 bool accept_events() const { return accept_events_; } |
| 93 void set_accept_events(bool accept_events) { accept_events_ = accept_events; } | 93 void set_accept_events(bool accept_events) { accept_events_ = accept_events; } |
| 94 | 94 |
| 95 bool adjust_if_offscreen() const { return adjust_if_offscreen_; } | 95 bool adjust_if_offscreen() const { return adjust_if_offscreen_; } |
| 96 void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; } | 96 void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; } |
| 97 | 97 |
| 98 // Get the arrow's anchor rect in screen space. | 98 // Get the arrow's anchor rect in screen space. |
| 99 virtual gfx::Rect GetAnchorRect() const; | 99 virtual gfx::Rect GetAnchorRect() const; |
| 100 | 100 |
| 101 // Allows delegates to provide custom parameters before widget initialization. | 101 // Allows delegates to provide custom parameters before widget initialization. |
| 102 // For example, mus needs to set a custom ui::Window* parent. | |
| 103 virtual void OnBeforeBubbleWidgetInit(Widget::InitParams* params, | 102 virtual void OnBeforeBubbleWidgetInit(Widget::InitParams* params, |
|
msw
2017/05/24 18:04:38
q: We should be able to eliminate this soon, if no
James Cook
2017/05/24 18:27:04
Unfortunately this one is still used to do things
msw
2017/05/24 18:48:36
Acknowledged. Sounds worth pursuing later on.
| |
| 104 Widget* widget) const; | 103 Widget* widget) const; |
| 105 | 104 |
| 106 // Sets |margins_| to a default picked for smaller bubbles. | 105 // Sets |margins_| to a default picked for smaller bubbles. |
| 107 void UseCompactMargins(); | 106 void UseCompactMargins(); |
| 108 | 107 |
| 109 // Sets the bubble alignment relative to the anchor. This may only be called | 108 // Sets the bubble alignment relative to the anchor. This may only be called |
| 110 // after calling CreateBubble. | 109 // after calling CreateBubble. |
| 111 void SetAlignment(BubbleBorder::BubbleAlignment alignment); | 110 void SetAlignment(BubbleBorder::BubbleAlignment alignment); |
| 112 | 111 |
| 113 // Sets the bubble arrow paint type. | 112 // Sets the bubble arrow paint type. |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 | 206 |
| 208 // Parent native window of the bubble. | 207 // Parent native window of the bubble. |
| 209 gfx::NativeView parent_window_; | 208 gfx::NativeView parent_window_; |
| 210 | 209 |
| 211 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); | 210 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); |
| 212 }; | 211 }; |
| 213 | 212 |
| 214 } // namespace views | 213 } // namespace views |
| 215 | 214 |
| 216 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ | 215 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ |
| OLD | NEW |