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" |
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 { | |
15 class Rect; | |
16 } | |
17 | |
18 namespace ui { | 14 namespace ui { |
19 class SlideAnimation; | 15 class SlideAnimation; |
20 } | 16 } |
21 | 17 |
22 namespace views { | 18 namespace views { |
23 | 19 |
24 class BubbleFrameView; | 20 class BubbleFrameView; |
25 | 21 |
26 // BubbleDelegateView creates frame and client views for bubble Widgets. | 22 // BubbleDelegateView creates frame and client views for bubble Widgets. |
27 // BubbleDelegateView itself is the client's contents view. | 23 // BubbleDelegateView itself is the client's contents view. |
(...skipping 17 matching lines...) Expand all Loading... |
45 // WidgetDelegate overrides: | 41 // WidgetDelegate overrides: |
46 virtual BubbleDelegateView* AsBubbleDelegate() OVERRIDE; | 42 virtual BubbleDelegateView* AsBubbleDelegate() OVERRIDE; |
47 virtual bool CanActivate() const OVERRIDE; | 43 virtual bool CanActivate() const OVERRIDE; |
48 virtual View* GetContentsView() OVERRIDE; | 44 virtual View* GetContentsView() OVERRIDE; |
49 virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget) OVERRIDE; | 45 virtual NonClientFrameView* CreateNonClientFrameView(Widget* widget) OVERRIDE; |
50 | 46 |
51 // WidgetObserver overrides: | 47 // WidgetObserver overrides: |
52 virtual void OnWidgetClosing(Widget* widget) OVERRIDE; | 48 virtual void OnWidgetClosing(Widget* widget) OVERRIDE; |
53 virtual void OnWidgetVisibilityChanged(Widget* widget, bool visible) OVERRIDE; | 49 virtual void OnWidgetVisibilityChanged(Widget* widget, bool visible) OVERRIDE; |
54 virtual void OnWidgetActivationChanged(Widget* widget, bool active) OVERRIDE; | 50 virtual void OnWidgetActivationChanged(Widget* widget, bool active) OVERRIDE; |
55 virtual void OnWidgetBoundsChanged(Widget* widget, | 51 virtual void OnWidgetMoved(Widget* widget) OVERRIDE; |
56 const gfx::Rect& new_bounds) OVERRIDE; | |
57 | 52 |
58 bool close_on_esc() const { return close_on_esc_; } | 53 bool close_on_esc() const { return close_on_esc_; } |
59 void set_close_on_esc(bool close_on_esc) { close_on_esc_ = close_on_esc; } | 54 void set_close_on_esc(bool close_on_esc) { close_on_esc_ = close_on_esc; } |
60 | 55 |
61 bool close_on_deactivate() const { return close_on_deactivate_; } | 56 bool close_on_deactivate() const { return close_on_deactivate_; } |
62 void set_close_on_deactivate(bool close_on_deactivate) { | 57 void set_close_on_deactivate(bool close_on_deactivate) { |
63 close_on_deactivate_ = close_on_deactivate; | 58 close_on_deactivate_ = close_on_deactivate; |
64 } | 59 } |
65 | 60 |
66 View* anchor_view() const { return anchor_view_; } | 61 View* anchor_view() const { return anchor_view_; } |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 207 |
213 // Parent native window of the bubble. | 208 // Parent native window of the bubble. |
214 gfx::NativeView parent_window_; | 209 gfx::NativeView parent_window_; |
215 | 210 |
216 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 211 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
217 }; | 212 }; |
218 | 213 |
219 } // namespace views | 214 } // namespace views |
220 | 215 |
221 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 216 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |