Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 ~DialogClientView() override; | 35 ~DialogClientView() override; |
| 36 | 36 |
| 37 // Accept or Cancel the dialog. | 37 // Accept or Cancel the dialog. |
| 38 void AcceptWindow(); | 38 void AcceptWindow(); |
| 39 void CancelWindow(); | 39 void CancelWindow(); |
| 40 | 40 |
| 41 // Accessors in case the user wishes to adjust these buttons. | 41 // Accessors in case the user wishes to adjust these buttons. |
| 42 LabelButton* ok_button() const { return ok_button_; } | 42 LabelButton* ok_button() const { return ok_button_; } |
| 43 LabelButton* cancel_button() const { return cancel_button_; } | 43 LabelButton* cancel_button() const { return cancel_button_; } |
| 44 | 44 |
| 45 // Update the OK button to match the dialog's delegate. | |
| 46 void UpdateOKButton(); | |
|
tapted
2016/02/15 06:24:14
nit: move to private: section + reorder in .cc
karandeepb
2016/02/15 06:59:15
Done.
| |
| 47 | |
| 48 // Update the cancel button to match the dialog's delegate. | |
| 49 void UpdateCancelButton(); | |
| 50 | |
| 45 // Update the dialog buttons to match the dialog's delegate. | 51 // Update the dialog buttons to match the dialog's delegate. |
| 46 void UpdateDialogButtons(); | 52 void UpdateDialogButtons(); |
| 47 | 53 |
| 48 // ClientView implementation: | 54 // ClientView implementation: |
| 49 bool CanClose() override; | 55 bool CanClose() override; |
| 50 DialogClientView* AsDialogClientView() override; | 56 DialogClientView* AsDialogClientView() override; |
| 51 const DialogClientView* AsDialogClientView() const override; | 57 const DialogClientView* AsDialogClientView() const override; |
| 52 | 58 |
| 53 // View implementation: | 59 // View implementation: |
| 54 gfx::Size GetPreferredSize() const override; | 60 gfx::Size GetPreferredSize() const override; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |