Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: ui/views/window/dialog_delegate.h

Issue 1141253002: [Views] Allow dialog delegates to use a custom padding for the extra view (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/window/dialog_client_view_unittest.cc ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/views/window/dialog_client_view_unittest.cc ('k') | ui/views/window/dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698