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_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 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "ui/base/animation/animation_delegate.h" | 9 #include "ui/base/animation/animation_delegate.h" |
10 #include "ui/views/bubble/bubble_border.h" | 10 #include "ui/views/bubble/bubble_border.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const gfx::Insets& anchor_insets() const { return anchor_insets_; } | 76 const gfx::Insets& anchor_insets() const { return anchor_insets_; } |
77 | 77 |
78 gfx::NativeView parent_window() const { return parent_window_; } | 78 gfx::NativeView parent_window() const { return parent_window_; } |
79 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } | 79 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } |
80 | 80 |
81 bool use_focusless() const { return use_focusless_; } | 81 bool use_focusless() const { return use_focusless_; } |
82 void set_use_focusless(bool use_focusless) { | 82 void set_use_focusless(bool use_focusless) { |
83 use_focusless_ = use_focusless; | 83 use_focusless_ = use_focusless; |
84 } | 84 } |
85 | 85 |
| 86 bool accept_events() const { return accept_events_; } |
| 87 void set_accept_events(bool accept_events) { accept_events_ = accept_events; } |
| 88 |
86 bool try_mirroring_arrow() const { return try_mirroring_arrow_; } | 89 bool try_mirroring_arrow() const { return try_mirroring_arrow_; } |
87 void set_try_mirroring_arrow(bool try_mirroring_arrow) { | 90 void set_try_mirroring_arrow(bool try_mirroring_arrow) { |
88 try_mirroring_arrow_ = try_mirroring_arrow; | 91 try_mirroring_arrow_ = try_mirroring_arrow; |
89 } | 92 } |
90 | 93 |
91 // Get the arrow's anchor rect in screen space. | 94 // Get the arrow's anchor rect in screen space. |
92 virtual gfx::Rect GetAnchorRect(); | 95 virtual gfx::Rect GetAnchorRect(); |
93 | 96 |
94 // Show the bubble's widget (and |border_widget_| on Windows). | 97 // Show the bubble's widget (and |border_widget_| on Windows). |
95 void Show(); | 98 void Show(); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // Original opacity of the bubble. | 174 // Original opacity of the bubble. |
172 int original_opacity_; | 175 int original_opacity_; |
173 | 176 |
174 // The widget hosting the border for this bubble (non-Aura Windows only). | 177 // The widget hosting the border for this bubble (non-Aura Windows only). |
175 Widget* border_widget_; | 178 Widget* border_widget_; |
176 | 179 |
177 // Create a popup window for focusless bubbles on Linux/ChromeOS. | 180 // Create a popup window for focusless bubbles on Linux/ChromeOS. |
178 // These bubbles are not interactive and should not gain focus. | 181 // These bubbles are not interactive and should not gain focus. |
179 bool use_focusless_; | 182 bool use_focusless_; |
180 | 183 |
| 184 // Specifies whether the popup accepts events or lets them pass through. |
| 185 bool accept_events_; |
| 186 |
181 // If true (defaults to true), the arrow may be mirrored to fit the | 187 // If true (defaults to true), the arrow may be mirrored to fit the |
182 // bubble on screen better. | 188 // bubble on screen better. |
183 bool try_mirroring_arrow_; | 189 bool try_mirroring_arrow_; |
184 | 190 |
185 // Parent native window of the bubble. | 191 // Parent native window of the bubble. |
186 gfx::NativeView parent_window_; | 192 gfx::NativeView parent_window_; |
187 | 193 |
188 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 194 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
189 }; | 195 }; |
190 | 196 |
191 } // namespace views | 197 } // namespace views |
192 | 198 |
193 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 199 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |