| 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_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| 6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 6 #define UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // If a custom padding should be used, returns true and populates |padding|. | 56 // If a custom padding should be used, returns true and populates |padding|. |
| 57 virtual bool GetExtraViewPadding(int* padding); | 57 virtual bool GetExtraViewPadding(int* padding); |
| 58 | 58 |
| 59 // Override this function to display an extra view in the titlebar. | 59 // Override this function to display an extra view in the titlebar. |
| 60 // Overrides may construct the view; this will only be called once per dialog. | 60 // Overrides may construct the view; this will only be called once per dialog. |
| 61 // Note: this only works for new style dialogs. | 61 // Note: this only works for new style dialogs. |
| 62 virtual View* CreateTitlebarExtraView(); | 62 virtual View* CreateTitlebarExtraView(); |
| 63 | 63 |
| 64 // Override this function to display a footnote view below the buttons. | 64 // Override this function to display a footnote view below the buttons. |
| 65 // Overrides may construct the view; this will only be called once per dialog. | 65 // Overrides may construct the view; this will only be called once per dialog. |
| 66 virtual View* CreateFootnoteView(); | 66 virtual scoped_ptr<View> CreateFootnoteView(); |
| 67 | 67 |
| 68 // For Dialog boxes, if there is a "Cancel" button or no dialog button at all, | 68 // For Dialog boxes, if there is a "Cancel" button or no dialog button at all, |
| 69 // this is called when the user presses the "Cancel" button or the Esc key. | 69 // this is called when the user presses the "Cancel" button or the Esc key. |
| 70 // It can also be called on a close action if |Close| has not been | 70 // It can also be called on a close action if |Close| has not been |
| 71 // overridden. This function should return true if the window can be closed | 71 // overridden. This function should return true if the window can be closed |
| 72 // after it returns, or false if it must remain open. | 72 // after it returns, or false if it must remain open. |
| 73 virtual bool Cancel(); | 73 virtual bool Cancel(); |
| 74 | 74 |
| 75 // For Dialog boxes, this is called when the user presses the "OK" button, | 75 // For Dialog boxes, this is called when the user presses the "OK" button, |
| 76 // or the Enter key. It can also be called on a close action if |Close| | 76 // or the Enter key. It can also be called on a close action if |Close| |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 void ViewHierarchyChanged( | 147 void ViewHierarchyChanged( |
| 148 const ViewHierarchyChangedDetails& details) override; | 148 const ViewHierarchyChangedDetails& details) override; |
| 149 | 149 |
| 150 private: | 150 private: |
| 151 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); | 151 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace views | 154 } // namespace views |
| 155 | 155 |
| 156 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 156 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| OLD | NEW |