| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Returns the height of the buttons. | 90 // Returns the height of the buttons. |
| 91 int GetButtonHeight() const; | 91 int GetButtonHeight() const; |
| 92 | 92 |
| 93 // Returns the height of the extra view. | 93 // Returns the height of the extra view. |
| 94 int GetExtraViewHeight() const; | 94 int GetExtraViewHeight() const; |
| 95 | 95 |
| 96 // 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. |
| 97 int GetButtonsAndExtraViewRowHeight() const; | 97 int GetButtonsAndExtraViewRowHeight() const; |
| 98 | 98 |
| 99 // Returns the insets for the buttons and extra view. | 99 // Returns the insets for the buttons and extra view, including the vertical |
| 100 // padding between them and the contents view. |
| 100 gfx::Insets GetButtonRowInsets() const; | 101 gfx::Insets GetButtonRowInsets() const; |
| 101 | 102 |
| 102 // Returns the vertical padding to place between the contents view and the | |
| 103 // buttons/extra view. | |
| 104 int GetButtonsAndExtraViewRowTopPadding() const; | |
| 105 | |
| 106 // How much to inset the button row. | 103 // How much to inset the button row. |
| 107 gfx::Insets button_row_insets_; | 104 gfx::Insets button_row_insets_; |
| 108 | 105 |
| 109 // Sets up the focus chain for the child views. This is required since the | 106 // Sets up the focus chain for the child views. This is required since the |
| 110 // delegate may choose to add/remove views at any time. | 107 // delegate may choose to add/remove views at any time. |
| 111 void SetupFocusChain(); | 108 void SetupFocusChain(); |
| 112 | 109 |
| 113 // The dialog buttons. | 110 // The dialog buttons. |
| 114 LabelButton* ok_button_; | 111 LabelButton* ok_button_; |
| 115 LabelButton* cancel_button_; | 112 LabelButton* cancel_button_; |
| 116 | 113 |
| 117 // The extra view shown in the row of buttons; may be NULL. | 114 // The extra view shown in the row of buttons; may be NULL. |
| 118 View* extra_view_; | 115 View* extra_view_; |
| 119 | 116 |
| 120 // True if we've notified the delegate the window is closing and the delegate | 117 // True if we've notified the delegate the window is closing and the delegate |
| 121 // allowed the close. In some situations it's possible to get two closes (see | 118 // allowed the close. In some situations it's possible to get two closes (see |
| 122 // 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 |
| 123 // twice, which can have bad consequences. | 120 // twice, which can have bad consequences. |
| 124 bool delegate_allowed_close_; | 121 bool delegate_allowed_close_; |
| 125 | 122 |
| 126 DISALLOW_COPY_AND_ASSIGN(DialogClientView); | 123 DISALLOW_COPY_AND_ASSIGN(DialogClientView); |
| 127 }; | 124 }; |
| 128 | 125 |
| 129 } // namespace views | 126 } // namespace views |
| 130 | 127 |
| 131 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 128 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
| OLD | NEW |