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_TEST_CHILD_WMODAL_WINDOW_H_ | 5 #ifndef UI_VIEWS_TEST_CHILD_WMODAL_WINDOW_H_ |
6 #define UI_VIEWS_TEST_CHILD_WMODAL_WINDOW_H_ | 6 #define UI_VIEWS_TEST_CHILD_WMODAL_WINDOW_H_ |
7 | 7 |
8 #include "ui/views/controls/button/button.h" | 8 #include "ui/views/controls/button/button.h" |
9 #include "ui/views/widget/widget_delegate.h" | 9 #include "ui/views/widget/widget_delegate.h" |
10 #include "ui/views/widget/widget_observer.h" | 10 #include "ui/views/widget/widget_observer.h" |
11 | 11 |
12 namespace views { | 12 namespace views { |
13 class NativeTextButton; | 13 class LabelButton; |
14 class NativeViewHost; | 14 class NativeViewHost; |
15 class Textfield; | 15 class Textfield; |
16 class View; | 16 class View; |
17 class Widget; | 17 class Widget; |
18 namespace test { | 18 namespace test { |
19 | 19 |
20 void CreateChildModalParent(gfx::NativeView context); | 20 void CreateChildModalParent(gfx::NativeView context); |
21 | 21 |
22 class ChildModalParent : public WidgetDelegateView, | 22 class ChildModalParent : public WidgetDelegateView, |
23 public ButtonListener, | 23 public ButtonListener, |
(...skipping 21 matching lines...) Expand all Loading... |
45 | 45 |
46 // Overridden from ButtonListener: | 46 // Overridden from ButtonListener: |
47 virtual void ButtonPressed(Button* sender, | 47 virtual void ButtonPressed(Button* sender, |
48 const ui::Event& event) OVERRIDE; | 48 const ui::Event& event) OVERRIDE; |
49 | 49 |
50 // Overridden from WidgetObserver: | 50 // Overridden from WidgetObserver: |
51 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; | 51 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; |
52 | 52 |
53 // The button to toggle showing and hiding the child window. The child window | 53 // The button to toggle showing and hiding the child window. The child window |
54 // does not block input to this button. | 54 // does not block input to this button. |
55 NativeTextButton* button_; | 55 LabelButton* button_; |
56 | 56 |
57 // The text field to indicate the keyboard focus. | 57 // The text field to indicate the keyboard focus. |
58 Textfield* textfield_; | 58 Textfield* textfield_; |
59 | 59 |
60 // The host for the modal parent. | 60 // The host for the modal parent. |
61 NativeViewHost* host_; | 61 NativeViewHost* host_; |
62 | 62 |
63 // The modal parent of the child window. The child window blocks input to this | 63 // The modal parent of the child window. The child window blocks input to this |
64 // view. | 64 // view. |
65 gfx::NativeWindow modal_parent_; | 65 gfx::NativeWindow modal_parent_; |
66 | 66 |
67 // The child window. | 67 // The child window. |
68 Widget* child_; | 68 Widget* child_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(ChildModalParent); | 70 DISALLOW_COPY_AND_ASSIGN(ChildModalParent); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace test | 73 } // namespace test |
74 } // namespace views | 74 } // namespace views |
75 | 75 |
76 #endif // UI_VIEWS_TEST_CHILD_WMODAL_WINDOW_H_ | 76 #endif // UI_VIEWS_TEST_CHILD_WMODAL_WINDOW_H_ |
OLD | NEW |