| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_VIEWS_DIALOG_DELEGATE_H_ | 5 #ifndef CHROME_VIEWS_DIALOG_DELEGATE_H_ |
| 6 #define CHROME_VIEWS_DIALOG_DELEGATE_H_ | 6 #define CHROME_VIEWS_DIALOG_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "chrome/views/dialog_client_view.h" | 8 #include "chrome/views/dialog_client_view.h" |
| 9 #include "chrome/views/window_delegate.h" | 9 #include "chrome/views/window_delegate.h" |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return L""; | 56 return L""; |
| 57 } | 57 } |
| 58 | 58 |
| 59 // Override this function if with a view which will be shown in the same | 59 // Override this function if with a view which will be shown in the same |
| 60 // row as the OK and CANCEL buttons but flush to the left and extending | 60 // row as the OK and CANCEL buttons but flush to the left and extending |
| 61 // up to the buttons. | 61 // up to the buttons. |
| 62 virtual View* GetExtraView() { return NULL; } | 62 virtual View* GetExtraView() { return NULL; } |
| 63 | 63 |
| 64 // Returns the default dialog button. This should not be a mask as only one | 64 // Returns the default dialog button. This should not be a mask as only one |
| 65 // button should ever be the default button. Return DIALOGBUTTON_NONE if | 65 // button should ever be the default button. Return DIALOGBUTTON_NONE if |
| 66 // there is no default. | 66 // there is no default. Default behavior is to return DIALOGBUTTON_OK or |
| 67 virtual int GetDefaultDialogButton() const { | 67 // DIALOGBUTTON_CANCEL (in that order) if they are present, DIALOGBUTTON_NONE |
| 68 return DIALOGBUTTON_OK; | 68 // otherwise. |
| 69 } | 69 virtual int GetDefaultDialogButton() const; |
| 70 | 70 |
| 71 // Returns whether the specified dialog button is enabled. | 71 // Returns whether the specified dialog button is enabled. |
| 72 virtual bool IsDialogButtonEnabled(DialogButton button) const { | 72 virtual bool IsDialogButtonEnabled(DialogButton button) const { |
| 73 return true; | 73 return true; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // Returns whether the specified dialog button is visible. | 76 // Returns whether the specified dialog button is visible. |
| 77 virtual bool IsDialogButtonVisible(DialogButton button) const { | 77 virtual bool IsDialogButtonVisible(DialogButton button) const { |
| 78 return true; | 78 return true; |
| 79 } | 79 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 104 | 104 |
| 105 // A helper for accessing the DialogClientView object contained by this | 105 // A helper for accessing the DialogClientView object contained by this |
| 106 // delegate's Window. | 106 // delegate's Window. |
| 107 DialogClientView* GetDialogClientView() const; | 107 DialogClientView* GetDialogClientView() const; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace views | 110 } // namespace views |
| 111 | 111 |
| 112 #endif // #ifndef CHROME_VIEWS_DIALOG_DELEGATE_H_ | 112 #endif // #ifndef CHROME_VIEWS_DIALOG_DELEGATE_H_ |
| 113 | 113 |
| OLD | NEW |