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_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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 // Override this function to display an extra view adjacent to the buttons. | 49 // Override this function to display an extra view adjacent to the buttons. |
| 50 // Overrides may construct the view; this will only be called once per dialog. | 50 // Overrides may construct the view; this will only be called once per dialog. |
| 51 virtual View* CreateExtraView(); | 51 virtual View* CreateExtraView(); |
| 52 | 52 |
| 53 // Override this function to adjust the padding between the extra view and | 53 // Override this function to adjust the padding between the extra view and |
| 54 // the confirm/cancel buttons. Note that if there are no buttons, this will | 54 // the confirm/cancel buttons. Note that if there are no buttons, this will |
| 55 // not be used. | 55 // not be used. |
| 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. | |
| 60 // Overrides may construct the view; this will only be called once per dialog. | |
| 61 // Note: this only works for new style dialogs. | |
| 62 virtual View* CreateTitlebarExtraView(); | |
|
Evan Stade
2016/02/23 19:02:36
this wasn't being used anywhere
| |
| 63 | |
| 64 // Override this function to display a footnote view below the buttons. | 59 // 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. | 60 // Overrides may construct the view; this will only be called once per dialog. |
| 66 virtual View* CreateFootnoteView(); | 61 virtual View* CreateFootnoteView(); |
| 67 | 62 |
| 68 // For Dialog boxes, if there is a "Cancel" button or no dialog button at all, | 63 // 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. | 64 // 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 | 65 // 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 | 66 // overridden. This function should return true if the window can be closed |
| 72 // after it returns, or false if it must remain open. | 67 // after it returns, or false if it must remain open. |
| 73 virtual bool Cancel(); | 68 virtual bool Cancel(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 void ViewHierarchyChanged( | 139 void ViewHierarchyChanged( |
| 145 const ViewHierarchyChangedDetails& details) override; | 140 const ViewHierarchyChangedDetails& details) override; |
| 146 | 141 |
| 147 private: | 142 private: |
| 148 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); | 143 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |
| 149 }; | 144 }; |
| 150 | 145 |
| 151 } // namespace views | 146 } // namespace views |
| 152 | 147 |
| 153 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 148 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
| OLD | NEW |