| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 protected: | 67 protected: |
| 68 // For testing. | 68 // For testing. |
| 69 explicit DialogClientView(View* contents_view); | 69 explicit DialogClientView(View* contents_view); |
| 70 | 70 |
| 71 // Returns the DialogDelegate for the window. Virtual for testing. | 71 // Returns the DialogDelegate for the window. Virtual for testing. |
| 72 virtual DialogDelegate* GetDialogDelegate() const; | 72 virtual DialogDelegate* GetDialogDelegate() const; |
| 73 | 73 |
| 74 // Create and add the extra view, if supplied by the delegate. | 74 // Create and add the extra view, if supplied by the delegate. |
| 75 void CreateExtraView(); | 75 void CreateExtraView(); |
| 76 | 76 |
| 77 // Returns the minimum width for a dialog button. |
| 78 int GetButtonMinimumWidth() const; |
| 79 |
| 77 // View implementation. | 80 // View implementation. |
| 78 void ChildPreferredSizeChanged(View* child) override; | 81 void ChildPreferredSizeChanged(View* child) override; |
| 79 void ChildVisibilityChanged(View* child) override; | 82 void ChildVisibilityChanged(View* child) override; |
| 80 | 83 |
| 81 private: | 84 private: |
| 82 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } | 85 bool has_dialog_buttons() const { return ok_button_ || cancel_button_; } |
| 83 | 86 |
| 84 // Create a dialog button of the appropriate type. | 87 // Create a dialog button of the appropriate type. |
| 85 LabelButton* CreateDialogButton(ui::DialogButton type); | 88 LabelButton* CreateDialogButton(ui::DialogButton type); |
| 86 | 89 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // http://crbug.com/71940). This is used to avoid notifying the delegate | 125 // http://crbug.com/71940). This is used to avoid notifying the delegate |
| 123 // twice, which can have bad consequences. | 126 // twice, which can have bad consequences. |
| 124 bool delegate_allowed_close_; | 127 bool delegate_allowed_close_; |
| 125 | 128 |
| 126 DISALLOW_COPY_AND_ASSIGN(DialogClientView); | 129 DISALLOW_COPY_AND_ASSIGN(DialogClientView); |
| 127 }; | 130 }; |
| 128 | 131 |
| 129 } // namespace views | 132 } // namespace views |
| 130 | 133 |
| 131 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ | 134 #endif // UI_VIEWS_WINDOW_DIALOG_CLIENT_VIEW_H_ |
| OLD | NEW |