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 #include "ui/views/window/dialog_delegate.h" | 5 #include "ui/views/window/dialog_delegate.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 // Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child | 84 // Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child |
85 // widgets to prevent top-level window behavior (independent movement, etc). | 85 // widgets to prevent top-level window behavior (independent movement, etc). |
86 // On Mac, however, the parent may be a native window (not a views::Widget), | 86 // On Mac, however, the parent may be a native window (not a views::Widget), |
87 // and so the dialog must be considered top-level to gain focus and input | 87 // and so the dialog must be considered top-level to gain focus and input |
88 // method behaviors. | 88 // method behaviors. |
89 params.child = parent && (delegate->GetModalType() == ui::MODAL_TYPE_CHILD); | 89 params.child = parent && (delegate->GetModalType() == ui::MODAL_TYPE_CHILD); |
90 #endif | 90 #endif |
91 return params; | 91 return params; |
92 } | 92 } |
93 | 93 |
94 StyledLabel* DialogDelegate::CreateTitleView() { | |
95 return nullptr; | |
Peter Kasting
2017/06/07 02:40:43
Why not have this return a StyledLabel for GetWind
Bret
2017/06/07 20:15:41
I'll keep this in mind as I rework it, and see if
| |
96 } | |
97 | |
94 View* DialogDelegate::CreateExtraView() { | 98 View* DialogDelegate::CreateExtraView() { |
95 return NULL; | 99 return nullptr; |
96 } | 100 } |
97 | 101 |
98 bool DialogDelegate::GetExtraViewPadding(int* padding) { | 102 bool DialogDelegate::GetExtraViewPadding(int* padding) { |
99 return false; | 103 return false; |
100 } | 104 } |
101 | 105 |
102 View* DialogDelegate::CreateFootnoteView() { | 106 View* DialogDelegate::CreateFootnoteView() { |
103 return NULL; | 107 return NULL; |
104 } | 108 } |
105 | 109 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
268 node_data->role = ui::AX_ROLE_DIALOG; | 272 node_data->role = ui::AX_ROLE_DIALOG; |
269 } | 273 } |
270 | 274 |
271 void DialogDelegateView::ViewHierarchyChanged( | 275 void DialogDelegateView::ViewHierarchyChanged( |
272 const ViewHierarchyChangedDetails& details) { | 276 const ViewHierarchyChangedDetails& details) { |
273 if (details.is_add && details.child == this && GetWidget()) | 277 if (details.is_add && details.child == this && GetWidget()) |
274 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 278 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
275 } | 279 } |
276 | 280 |
277 } // namespace views | 281 } // namespace views |
OLD | NEW |