Chromium Code Reviews| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 void set_margins(const gfx::Insets& margins) { margins_ = margins; } | 74 void set_margins(const gfx::Insets& margins) { margins_ = margins; } |
| 75 | 75 |
| 76 gfx::NativeView parent_window() const { return parent_window_; } | 76 gfx::NativeView parent_window() const { return parent_window_; } |
| 77 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } | 77 void set_parent_window(gfx::NativeView window) { parent_window_ = window; } |
| 78 | 78 |
| 79 bool use_focusless() const { return use_focusless_; } | 79 bool use_focusless() const { return use_focusless_; } |
| 80 void set_use_focusless(bool use_focusless) { | 80 void set_use_focusless(bool use_focusless) { |
| 81 use_focusless_ = use_focusless; | 81 use_focusless_ = use_focusless; |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool try_mirroring_arrow() { return try_mirroring_arrow_; } | |
|
sky
2012/07/31 16:11:06
const
Mr4D (OOO till 08-26)
2012/08/01 20:48:22
Done.
| |
| 85 void set_try_mirroring_arrow(bool try_mirroring_arrow) { | |
| 86 try_mirroring_arrow_ = try_mirroring_arrow; | |
| 87 } | |
| 88 | |
| 84 // Get the arrow's anchor rect in screen space. | 89 // Get the arrow's anchor rect in screen space. |
| 85 virtual gfx::Rect GetAnchorRect(); | 90 virtual gfx::Rect GetAnchorRect(); |
| 86 | 91 |
| 87 // Show the bubble's widget (and |border_widget_| on Windows). | 92 // Show the bubble's widget (and |border_widget_| on Windows). |
| 88 void Show(); | 93 void Show(); |
| 89 | 94 |
| 90 // Fade the bubble in or out via Widget transparency. | 95 // Fade the bubble in or out via Widget transparency. |
| 91 // Fade in calls Widget::Show; fade out calls Widget::Close upon completion. | 96 // Fade in calls Widget::Show; fade out calls Widget::Close upon completion. |
| 92 void StartFade(bool fade_in); | 97 void StartFade(bool fade_in); |
| 93 | 98 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 // Original opacity of the bubble. | 166 // Original opacity of the bubble. |
| 162 int original_opacity_; | 167 int original_opacity_; |
| 163 | 168 |
| 164 // The widget hosting the border for this bubble (non-Aura Windows only). | 169 // The widget hosting the border for this bubble (non-Aura Windows only). |
| 165 Widget* border_widget_; | 170 Widget* border_widget_; |
| 166 | 171 |
| 167 // Create a popup window for focusless bubbles on Linux/ChromeOS. | 172 // Create a popup window for focusless bubbles on Linux/ChromeOS. |
| 168 // These bubbles are not interactive and should not gain focus. | 173 // These bubbles are not interactive and should not gain focus. |
| 169 bool use_focusless_; | 174 bool use_focusless_; |
| 170 | 175 |
| 176 // If true, the arrow may be mirrored to fit the bubble on screen better. | |
| 177 bool try_mirroring_arrow_; | |
| 178 | |
| 171 // Parent native window of the bubble. | 179 // Parent native window of the bubble. |
| 172 gfx::NativeView parent_window_; | 180 gfx::NativeView parent_window_; |
| 173 | 181 |
| 174 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 182 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
| 175 }; | 183 }; |
| 176 | 184 |
| 177 } // namespace views | 185 } // namespace views |
| 178 | 186 |
| 179 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 187 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
| OLD | NEW |