| 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 "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/base/ui_base_types.h" | 10 #include "ui/base/ui_base_types.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } | 82 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } |
| 83 | 83 |
| 84 // Create a dialog button of the appropriate type. | 84 // Create a dialog button of the appropriate type. |
| 85 LabelButton* CreateDialogButton(ui::DialogButton type); | 85 LabelButton* CreateDialogButton(ui::DialogButton type); |
| 86 | 86 |
| 87 // Update |button|'s text and enabled state according to the delegate's state. | 87 // Update |button|'s text and enabled state according to the delegate's state. |
| 88 void UpdateButton(LabelButton* button, ui::DialogButton type); | 88 void UpdateButton(LabelButton* button, ui::DialogButton type); |
| 89 | 89 |
| 90 // Update the OK button to match the dialog's delegate. |
| 91 void UpdateOKButton(); |
| 92 |
| 93 // Update the cancel button to match the dialog's delegate. |
| 94 void UpdateCancelButton(); |
| 95 |
| 90 // Returns the height of the row containing the buttons and the extra view. | 96 // Returns the height of the row containing the buttons and the extra view. |
| 91 int GetButtonsAndExtraViewRowHeight() const; | 97 int GetButtonsAndExtraViewRowHeight() const; |
| 92 | 98 |
| 93 // Returns the insets for the buttons and extra view. | 99 // Returns the insets for the buttons and extra view. |
| 94 gfx::Insets GetButtonRowInsets() const; | 100 gfx::Insets GetButtonRowInsets() const; |
| 95 | 101 |
| 96 // Closes the widget. | 102 // Closes the widget. |
| 97 void Close(); | 103 void Close(); |
| 98 | 104 |
| 99 // The dialog buttons. | 105 // The dialog buttons. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 111 // http://crbug.com/71940). This is used to avoid notifying the delegate | 117 // http://crbug.com/71940). This is used to avoid notifying the delegate |
| 112 // twice, which can have bad consequences. | 118 // twice, which can have bad consequences. |
| 113 bool notified_delegate_; | 119 bool notified_delegate_; |
| 114 | 120 |
| 115 DISALLOW_COPY_AND_ASSIGN(DialogClientView); | 121 DISALLOW_COPY_AND_ASSIGN(DialogClientView); |
| 116 }; | 122 }; |
| 117 | 123 |
| 118 } // namespace views | 124 } // namespace views |
| 119 | 125 |
| 120 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 126 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
| OLD | NEW |