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 #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 "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 } | 220 } |
| 221 | 221 |
| 222 const DialogClientView* DialogDelegate::GetDialogClientView() const { | 222 const DialogClientView* DialogDelegate::GetDialogClientView() const { |
| 223 return GetWidget()->client_view()->AsDialogClientView(); | 223 return GetWidget()->client_view()->AsDialogClientView(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 DialogClientView* DialogDelegate::GetDialogClientView() { | 226 DialogClientView* DialogDelegate::GetDialogClientView() { |
| 227 return GetWidget()->client_view()->AsDialogClientView(); | 227 return GetWidget()->client_view()->AsDialogClientView(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 bool DialogDelegate::ShouldSnapFrameWidth() const { | |
| 231 return true; | |
|
Peter Kasting
2017/04/06 06:32:16
Since this patch already makes bubbles-that-aren't
| |
| 232 } | |
| 233 | |
| 230 ui::AXRole DialogDelegate::GetAccessibleWindowRole() const { | 234 ui::AXRole DialogDelegate::GetAccessibleWindowRole() const { |
| 231 return ui::AX_ROLE_DIALOG; | 235 return ui::AX_ROLE_DIALOG; |
| 232 } | 236 } |
| 233 | 237 |
| 234 //////////////////////////////////////////////////////////////////////////////// | 238 //////////////////////////////////////////////////////////////////////////////// |
| 235 // DialogDelegateView: | 239 // DialogDelegateView: |
| 236 | 240 |
| 237 DialogDelegateView::DialogDelegateView() { | 241 DialogDelegateView::DialogDelegateView() { |
| 238 // A WidgetDelegate should be deleted on DeleteDelegate. | 242 // A WidgetDelegate should be deleted on DeleteDelegate. |
| 239 set_owned_by_client(); | 243 set_owned_by_client(); |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 262 node_data->role = ui::AX_ROLE_DIALOG; | 266 node_data->role = ui::AX_ROLE_DIALOG; |
| 263 } | 267 } |
| 264 | 268 |
| 265 void DialogDelegateView::ViewHierarchyChanged( | 269 void DialogDelegateView::ViewHierarchyChanged( |
| 266 const ViewHierarchyChangedDetails& details) { | 270 const ViewHierarchyChangedDetails& details) { |
| 267 if (details.is_add && details.child == this && GetWidget()) | 271 if (details.is_add && details.child == this && GetWidget()) |
| 268 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 272 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
| 269 } | 273 } |
| 270 | 274 |
| 271 } // namespace views | 275 } // namespace views |
| OLD | NEW |