OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ASH_TEST_CHILD_MODAL_WINDOW_H_ | 5 #ifndef ASH_TEST_CHILD_MODAL_WINDOW_H_ |
6 #define ASH_TEST_CHILD_MODAL_WINDOW_H_ | 6 #define ASH_TEST_CHILD_MODAL_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" |
(...skipping 19 matching lines...) Expand all Loading... |
30 virtual ~ChildModalParent(); | 30 virtual ~ChildModalParent(); |
31 | 31 |
32 void ShowChild(); | 32 void ShowChild(); |
33 gfx::NativeWindow GetModalParent() const; | 33 gfx::NativeWindow GetModalParent() const; |
34 gfx::NativeWindow GetChild() const; | 34 gfx::NativeWindow GetChild() const; |
35 | 35 |
36 private: | 36 private: |
37 views::Widget* CreateChild(); | 37 views::Widget* CreateChild(); |
38 | 38 |
39 // Overridden from views::WidgetDelegate: | 39 // Overridden from views::WidgetDelegate: |
40 virtual View* GetContentsView() OVERRIDE; | 40 virtual View* GetContentsView() override; |
41 virtual base::string16 GetWindowTitle() const OVERRIDE; | 41 virtual base::string16 GetWindowTitle() const override; |
42 virtual bool CanResize() const OVERRIDE; | 42 virtual bool CanResize() const override; |
43 virtual void DeleteDelegate() OVERRIDE; | 43 virtual void DeleteDelegate() override; |
44 | 44 |
45 // Overridden from views::View: | 45 // Overridden from views::View: |
46 virtual void Layout() OVERRIDE; | 46 virtual void Layout() override; |
47 virtual void ViewHierarchyChanged( | 47 virtual void ViewHierarchyChanged( |
48 const ViewHierarchyChangedDetails& details) OVERRIDE; | 48 const ViewHierarchyChangedDetails& details) override; |
49 | 49 |
50 // Overridden from ButtonListener: | 50 // Overridden from ButtonListener: |
51 virtual void ButtonPressed(views::Button* sender, | 51 virtual void ButtonPressed(views::Button* sender, |
52 const ui::Event& event) OVERRIDE; | 52 const ui::Event& event) override; |
53 | 53 |
54 // Overridden from WidgetObserver: | 54 // Overridden from WidgetObserver: |
55 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; | 55 virtual void OnWidgetDestroying(views::Widget* widget) override; |
56 | 56 |
57 // The button to toggle showing and hiding the child window. The child window | 57 // The button to toggle showing and hiding the child window. The child window |
58 // does not block input to this button. | 58 // does not block input to this button. |
59 views::LabelButton* button_; | 59 views::LabelButton* button_; |
60 | 60 |
61 // The text field to indicate the keyboard focus. | 61 // The text field to indicate the keyboard focus. |
62 views::Textfield* textfield_; | 62 views::Textfield* textfield_; |
63 | 63 |
64 // The host for the modal parent. | 64 // The host for the modal parent. |
65 views::NativeViewHost* host_; | 65 views::NativeViewHost* host_; |
66 | 66 |
67 // The modal parent of the child window. The child window blocks input to this | 67 // The modal parent of the child window. The child window blocks input to this |
68 // view. | 68 // view. |
69 gfx::NativeWindow modal_parent_; | 69 gfx::NativeWindow modal_parent_; |
70 | 70 |
71 // The child window. | 71 // The child window. |
72 views::Widget* child_; | 72 views::Widget* child_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(ChildModalParent); | 74 DISALLOW_COPY_AND_ASSIGN(ChildModalParent); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace test | 77 } // namespace test |
78 } // namespace ash | 78 } // namespace ash |
79 | 79 |
80 #endif // ASH_TEST_CHILD_MODAL_WINDOW_H_ | 80 #endif // ASH_TEST_CHILD_MODAL_WINDOW_H_ |
OLD | NEW |