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

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

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_delegate.h ('k') | no next file » | 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 #include "ui/views/window/dialog_delegate.h" 5 #include "ui/views/window/dialog_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/accessibility/ax_view_state.h" 8 #include "ui/accessibility/ax_view_state.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/strings/grit/ui_strings.h" 10 #include "ui/strings/grit/ui_strings.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // widgets to prevent top-level window behavior (independent movement, etc). 70 // widgets to prevent top-level window behavior (independent movement, etc).
71 params.child = parent && (delegate->GetModalType() == ui::MODAL_TYPE_CHILD); 71 params.child = parent && (delegate->GetModalType() == ui::MODAL_TYPE_CHILD);
72 widget->Init(params); 72 widget->Init(params);
73 return widget; 73 return widget;
74 } 74 }
75 75
76 View* DialogDelegate::CreateExtraView() { 76 View* DialogDelegate::CreateExtraView() {
77 return NULL; 77 return NULL;
78 } 78 }
79 79
80 bool DialogDelegate::GetExtraViewPadding(int* padding) {
81 return false;
82 }
83
80 View* DialogDelegate::CreateTitlebarExtraView() { 84 View* DialogDelegate::CreateTitlebarExtraView() {
81 return NULL; 85 return NULL;
82 } 86 }
83 87
84 View* DialogDelegate::CreateFootnoteView() { 88 View* DialogDelegate::CreateFootnoteView() {
85 return NULL; 89 return NULL;
86 } 90 }
87 91
88 bool DialogDelegate::Cancel() { 92 bool DialogDelegate::Cancel() {
89 return true; 93 return true;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 state->role = ui::AX_ROLE_DIALOG; 244 state->role = ui::AX_ROLE_DIALOG;
241 } 245 }
242 246
243 void DialogDelegateView::ViewHierarchyChanged( 247 void DialogDelegateView::ViewHierarchyChanged(
244 const ViewHierarchyChangedDetails& details) { 248 const ViewHierarchyChangedDetails& details) {
245 if (details.is_add && details.child == this && GetWidget()) 249 if (details.is_add && details.child == this && GetWidget())
246 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 250 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
247 } 251 }
248 252
249 } // namespace views 253 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/window/dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698