| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 virtual void Init(); | 141 virtual void Init(); |
| 142 | 142 |
| 143 // Sets the anchor view or rect and repositions the bubble. Note that if a | 143 // Sets the anchor view or rect and repositions the bubble. Note that if a |
| 144 // valid view gets passed, the anchor rect will get ignored. If the view gets | 144 // valid view gets passed, the anchor rect will get ignored. If the view gets |
| 145 // deleted, but no new view gets set, the last known anchor postion will get | 145 // deleted, but no new view gets set, the last known anchor postion will get |
| 146 // returned. | 146 // returned. |
| 147 void SetAnchorView(View* anchor_view); | 147 void SetAnchorView(View* anchor_view); |
| 148 void SetAnchorRect(const gfx::Rect& rect); | 148 void SetAnchorRect(const gfx::Rect& rect); |
| 149 | 149 |
| 150 // Resize and potentially move the bubble to fit the content's preferred size. | 150 // Resize and potentially move the bubble to fit the content's preferred size. |
| 151 void SizeToContents(); | 151 virtual void SizeToContents(); |
| 152 | 152 |
| 153 BubbleFrameView* GetBubbleFrameView() const; | 153 BubbleFrameView* GetBubbleFrameView() const; |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 friend class BubbleBorderDelegate; | 156 friend class BubbleBorderDelegate; |
| 157 friend class BubbleWindowTargeter; | 157 friend class BubbleWindowTargeter; |
| 158 | 158 |
| 159 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate); | 159 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate); |
| 160 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, NonClientHitTest); | 160 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, NonClientHitTest); |
| 161 | 161 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 // Parent native window of the bubble. | 210 // Parent native window of the bubble. |
| 211 gfx::NativeView parent_window_; | 211 gfx::NativeView parent_window_; |
| 212 | 212 |
| 213 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); | 213 DISALLOW_COPY_AND_ASSIGN(BubbleDialogDelegateView); |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 } // namespace views | 216 } // namespace views |
| 217 | 217 |
| 218 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ | 218 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE2_H_ |
| OLD | NEW |