| 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 // Returns the height of the buttons. |
| 91 int GetButtonHeight() const; |
| 92 |
| 93 // Returns the height of the extra view. |
| 94 int GetExtraViewHeight() const; |
| 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 // How much to inset the button row. | 102 // How much to inset the button row. |
| 97 gfx::Insets button_row_insets_; | 103 gfx::Insets button_row_insets_; |
| 98 | 104 |
| 99 // Sets up the focus chain for the child views. This is required since the | 105 // Sets up the focus chain for the child views. This is required since the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 112 // http://crbug.com/71940). This is used to avoid notifying the delegate | 118 // http://crbug.com/71940). This is used to avoid notifying the delegate |
| 113 // twice, which can have bad consequences. | 119 // twice, which can have bad consequences. |
| 114 bool delegate_allowed_close_; | 120 bool delegate_allowed_close_; |
| 115 | 121 |
| 116 DISALLOW_COPY_AND_ASSIGN(DialogClientView); | 122 DISALLOW_COPY_AND_ASSIGN(DialogClientView); |
| 117 }; | 123 }; |
| 118 | 124 |
| 119 } // namespace views | 125 } // namespace views |
| 120 | 126 |
| 121 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 127 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
| OLD | NEW |