OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DELEGATE_H_ | 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
6 #define UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 6 #define UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "ui/base/animation/animation_delegate.h" | 10 #include "ui/base/animation/animation_delegate.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void set_close_on_deactivate(bool close_on_deactivate) { | 53 void set_close_on_deactivate(bool close_on_deactivate) { |
54 close_on_deactivate_ = close_on_deactivate; | 54 close_on_deactivate_ = close_on_deactivate; |
55 } | 55 } |
56 | 56 |
57 bool allow_bubble_offscreen() const { return allow_bubble_offscreen_; } | 57 bool allow_bubble_offscreen() const { return allow_bubble_offscreen_; } |
58 void set_allow_bubble_offscreen(bool allow_bubble_offscreen) { | 58 void set_allow_bubble_offscreen(bool allow_bubble_offscreen) { |
59 allow_bubble_offscreen_ = allow_bubble_offscreen; | 59 allow_bubble_offscreen_ = allow_bubble_offscreen; |
60 } | 60 } |
61 | 61 |
62 View* anchor_view() const { return anchor_view_; } | 62 View* anchor_view() const { return anchor_view_; } |
| 63 void set_anchor_view(View* anchor_view) { anchor_view_ = anchor_view; } |
63 | 64 |
64 bool use_focusless() const { return use_focusless_; } | 65 bool use_focusless() const { return use_focusless_; } |
65 void set_use_focusless(bool use_focusless) { | 66 void set_use_focusless(bool use_focusless) { |
66 use_focusless_ = use_focusless; | 67 use_focusless_ = use_focusless; |
67 } | 68 } |
68 | 69 |
69 // Get the arrow's anchor point in screen space. | 70 // Get the arrow's anchor point in screen space. |
70 virtual gfx::Point GetAnchorPoint(); | 71 virtual gfx::Point GetAnchorPoint(); |
71 | 72 |
72 // Get the arrow's location on the bubble. | 73 // Get the arrow's location on the bubble. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Create a popup window for focusless bubbles on Linux/ChromeOS. | 145 // Create a popup window for focusless bubbles on Linux/ChromeOS. |
145 // These bubbles are not interactive and should not gain focus. | 146 // These bubbles are not interactive and should not gain focus. |
146 bool use_focusless_; | 147 bool use_focusless_; |
147 | 148 |
148 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 149 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
149 }; | 150 }; |
150 | 151 |
151 } // namespace views | 152 } // namespace views |
152 | 153 |
153 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 154 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |