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/views/bubble/bubble_border.h" | 9 #include "ui/views/bubble/bubble_border.h" |
10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
11 #include "ui/views/widget/widget_delegate.h" | 11 #include "ui/views/widget/widget_delegate.h" |
12 #include "ui/views/widget/widget_observer.h" | 12 #include "ui/views/widget/widget_observer.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class FontList; | |
15 class Rect; | 16 class Rect; |
16 } | 17 } |
17 | 18 |
18 namespace views { | 19 namespace views { |
19 | 20 |
20 class BubbleFrameView; | 21 class BubbleFrameView; |
21 | 22 |
22 // BubbleDelegateView creates frame and client views for bubble Widgets. | 23 // BubbleDelegateView creates frame and client views for bubble Widgets. |
23 // BubbleDelegateView itself is the client's contents view. | 24 // BubbleDelegateView itself is the client's contents view. |
24 class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView, | 25 class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView, |
(...skipping 17 matching lines...) Expand all Loading... | |
42 // WidgetObserver overrides: | 43 // WidgetObserver overrides: |
43 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; | 44 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; |
44 virtual void OnWidgetVisibilityChanging(Widget* widget, bool visible) | 45 virtual void OnWidgetVisibilityChanging(Widget* widget, bool visible) |
45 OVERRIDE; | 46 OVERRIDE; |
46 virtual void OnWidgetVisibilityChanged(Widget* widget, bool visible) | 47 virtual void OnWidgetVisibilityChanged(Widget* widget, bool visible) |
47 OVERRIDE; | 48 OVERRIDE; |
48 virtual void OnWidgetActivationChanged(Widget* widget, bool active) OVERRIDE; | 49 virtual void OnWidgetActivationChanged(Widget* widget, bool active) OVERRIDE; |
49 virtual void OnWidgetBoundsChanged(Widget* widget, | 50 virtual void OnWidgetBoundsChanged(Widget* widget, |
50 const gfx::Rect& new_bounds) OVERRIDE; | 51 const gfx::Rect& new_bounds) OVERRIDE; |
51 | 52 |
53 // Return a FontList to use for the title of the bubble. | |
54 // (The default is MediumFont). | |
55 virtual const gfx::FontList& GetTitleFontList() const; | |
msw
2014/06/16 22:58:32
nit: make this protected. (or order it below GetAn
Greg Billock
2014/06/17 14:47:47
Good point. Moved below GetBubbleBounds, which is
| |
56 | |
52 bool close_on_esc() const { return close_on_esc_; } | 57 bool close_on_esc() const { return close_on_esc_; } |
53 void set_close_on_esc(bool close_on_esc) { close_on_esc_ = close_on_esc; } | 58 void set_close_on_esc(bool close_on_esc) { close_on_esc_ = close_on_esc; } |
54 | 59 |
55 bool close_on_deactivate() const { return close_on_deactivate_; } | 60 bool close_on_deactivate() const { return close_on_deactivate_; } |
56 void set_close_on_deactivate(bool close) { close_on_deactivate_ = close; } | 61 void set_close_on_deactivate(bool close) { close_on_deactivate_ = close; } |
57 | 62 |
58 View* GetAnchorView() const; | 63 View* GetAnchorView() const; |
59 Widget* anchor_widget() const { return anchor_widget_; } | 64 Widget* anchor_widget() const { return anchor_widget_; } |
60 | 65 |
61 // The anchor rect is used in the absence of an assigned anchor view. | 66 // The anchor rect is used in the absence of an assigned anchor view. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 | 196 |
192 // Parent native window of the bubble. | 197 // Parent native window of the bubble. |
193 gfx::NativeView parent_window_; | 198 gfx::NativeView parent_window_; |
194 | 199 |
195 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 200 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
196 }; | 201 }; |
197 | 202 |
198 } // namespace views | 203 } // namespace views |
199 | 204 |
200 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 205 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |