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/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "ui/accessibility/ax_enums.h" | 10 #include "ui/accessibility/ax_enums.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // a default location is used. | 42 // a default location is used. |
43 static Widget* CreateDialogWidgetWithBounds(WidgetDelegate* delegate, | 43 static Widget* CreateDialogWidgetWithBounds(WidgetDelegate* delegate, |
44 gfx::NativeWindow context, | 44 gfx::NativeWindow context, |
45 gfx::NativeView parent, | 45 gfx::NativeView parent, |
46 const gfx::Rect& bounds); | 46 const gfx::Rect& bounds); |
47 | 47 |
48 // Override this function to display an extra view adjacent to the buttons. | 48 // Override this function to display an extra view adjacent to the buttons. |
49 // Overrides may construct the view; this will only be called once per dialog. | 49 // Overrides may construct the view; this will only be called once per dialog. |
50 virtual View* CreateExtraView(); | 50 virtual View* CreateExtraView(); |
51 | 51 |
| 52 // Override this function to adjust the padding between the extra view and |
| 53 // the confirm/cancel buttons. Note that if there are no buttons, this will |
| 54 // not be used. |
| 55 // If a custom padding should be used, returns true and populates |padding|. |
| 56 virtual bool GetExtraViewPadding(int* padding); |
| 57 |
52 // Override this function to display an extra view in the titlebar. | 58 // Override this function to display an extra view in the titlebar. |
53 // Overrides may construct the view; this will only be called once per dialog. | 59 // Overrides may construct the view; this will only be called once per dialog. |
54 // Note: this only works for new style dialogs. | 60 // Note: this only works for new style dialogs. |
55 virtual View* CreateTitlebarExtraView(); | 61 virtual View* CreateTitlebarExtraView(); |
56 | 62 |
57 // Override this function to display a footnote view below the buttons. | 63 // Override this function to display a footnote view below the buttons. |
58 // Overrides may construct the view; this will only be called once per dialog. | 64 // Overrides may construct the view; this will only be called once per dialog. |
59 virtual View* CreateFootnoteView(); | 65 virtual View* CreateFootnoteView(); |
60 | 66 |
61 // For Dialog boxes, if there is a "Cancel" button or no dialog button at all, | 67 // For Dialog boxes, if there is a "Cancel" button or no dialog button at all, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void ViewHierarchyChanged( | 146 void ViewHierarchyChanged( |
141 const ViewHierarchyChangedDetails& details) override; | 147 const ViewHierarchyChangedDetails& details) override; |
142 | 148 |
143 private: | 149 private: |
144 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); | 150 DISALLOW_COPY_AND_ASSIGN(DialogDelegateView); |
145 }; | 151 }; |
146 | 152 |
147 } // namespace views | 153 } // namespace views |
148 | 154 |
149 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ | 155 #endif // UI_VIEWS_WINDOW_DIALOG_DELEGATE_H_ |
OLD | NEW |