| 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 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 24 #include "ui/base/win/shell.h" | 24 #include "ui/base/win/shell.h" |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 namespace views { | 27 namespace views { |
| 28 | 28 |
| 29 //////////////////////////////////////////////////////////////////////////////// | 29 //////////////////////////////////////////////////////////////////////////////// |
| 30 // DialogDelegate: | 30 // DialogDelegate: |
| 31 | 31 |
| 32 DialogDelegate::DialogDelegate() : supports_new_style_(true) { | 32 DialogDelegate::DialogDelegate() : supports_new_style_(true) {} |
| 33 } | |
| 34 | 33 |
| 35 DialogDelegate::~DialogDelegate() { | 34 DialogDelegate::~DialogDelegate() {} |
| 36 } | |
| 37 | 35 |
| 38 // static | 36 // static |
| 39 Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, | 37 Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, |
| 40 gfx::NativeWindow context, | 38 gfx::NativeWindow context, |
| 41 gfx::NativeView parent) { | 39 gfx::NativeView parent) { |
| 42 return CreateDialogWidgetWithBounds(delegate, context, parent, gfx::Rect()); | 40 return CreateDialogWidgetWithBounds(delegate, context, parent, gfx::Rect()); |
| 43 } | 41 } |
| 44 | 42 |
| 45 // static | 43 // static |
| 46 Widget* DialogDelegate::CreateDialogWidgetWithBounds(WidgetDelegate* delegate, | 44 Widget* DialogDelegate::CreateDialogWidgetWithBounds(WidgetDelegate* delegate, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 state->role = ui::AX_ROLE_DIALOG; | 248 state->role = ui::AX_ROLE_DIALOG; |
| 251 } | 249 } |
| 252 | 250 |
| 253 void DialogDelegateView::ViewHierarchyChanged( | 251 void DialogDelegateView::ViewHierarchyChanged( |
| 254 const ViewHierarchyChangedDetails& details) { | 252 const ViewHierarchyChangedDetails& details) { |
| 255 if (details.is_add && details.child == this && GetWidget()) | 253 if (details.is_add && details.child == this && GetWidget()) |
| 256 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 254 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
| 257 } | 255 } |
| 258 | 256 |
| 259 } // namespace views | 257 } // namespace views |
| OLD | NEW |