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_WINDOW_DIALOG_CLIENT_VIEW_H_ | 5 #ifndef UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
6 #define UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 6 #define UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
7 | 7 |
8 #include "ui/base/ui_base_types.h" | 8 #include "ui/base/ui_base_types.h" |
9 #include "ui/views/controls/button/button.h" | 9 #include "ui/views/controls/button/button.h" |
10 #include "ui/views/focus/focus_manager.h" | 10 #include "ui/views/focus/focus_manager.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 // Returns the DialogDelegate for the window. Virtual for testing. | 74 // Returns the DialogDelegate for the window. Virtual for testing. |
75 virtual DialogDelegate* GetDialogDelegate() const; | 75 virtual DialogDelegate* GetDialogDelegate() const; |
76 | 76 |
77 // Create and add the extra view, if supplied by the delegate. | 77 // Create and add the extra view, if supplied by the delegate. |
78 void CreateExtraView(); | 78 void CreateExtraView(); |
79 | 79 |
80 // Creates and adds the footnote view, if supplied by the delegate. | 80 // Creates and adds the footnote view, if supplied by the delegate. |
81 void CreateFootnoteView(); | 81 void CreateFootnoteView(); |
82 | 82 |
| 83 // View implementation. |
| 84 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; |
| 85 |
83 private: | 86 private: |
84 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } | 87 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } |
85 | 88 |
86 // Create a dialog button of the appropriate type. | 89 // Create a dialog button of the appropriate type. |
87 LabelButton* CreateDialogButton(ui::DialogButton type); | 90 LabelButton* CreateDialogButton(ui::DialogButton type); |
88 | 91 |
89 // Returns the height of the row containing the buttons and the extra view. | 92 // Returns the height of the row containing the buttons and the extra view. |
90 int GetButtonsAndExtraViewRowHeight() const; | 93 int GetButtonsAndExtraViewRowHeight() const; |
91 | 94 |
92 // Returns the insets for the buttons and extra view. | 95 // Returns the insets for the buttons and extra view. |
(...skipping 23 matching lines...) Expand all Loading... |
116 // http://crbug.com/71940). This is used to avoid notifying the delegate | 119 // http://crbug.com/71940). This is used to avoid notifying the delegate |
117 // twice, which can have bad consequences. | 120 // twice, which can have bad consequences. |
118 bool notified_delegate_; | 121 bool notified_delegate_; |
119 | 122 |
120 DISALLOW_COPY_AND_ASSIGN(DialogClientView); | 123 DISALLOW_COPY_AND_ASSIGN(DialogClientView); |
121 }; | 124 }; |
122 | 125 |
123 } // namespace views | 126 } // namespace views |
124 | 127 |
125 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 128 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
OLD | NEW |