| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/bubble/bubble_dialog_delegate.h" | 5 #include "ui/views/bubble/bubble_dialog_delegate.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "ui/accessibility/ax_node_data.h" | 9 #include "ui/accessibility/ax_node_data.h" |
| 10 #include "ui/base/default_style.h" | 10 #include "ui/base/default_style.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 BubbleDialogDelegateView* BubbleDialogDelegateView::AsBubbleDialogDelegate() { | 90 BubbleDialogDelegateView* BubbleDialogDelegateView::AsBubbleDialogDelegate() { |
| 91 return this; | 91 return this; |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool BubbleDialogDelegateView::ShouldShowCloseButton() const { | 94 bool BubbleDialogDelegateView::ShouldShowCloseButton() const { |
| 95 return false; | 95 return false; |
| 96 } | 96 } |
| 97 | 97 |
| 98 ClientView* BubbleDialogDelegateView::CreateClientView(Widget* widget) { | 98 ClientView* BubbleDialogDelegateView::CreateClientView(Widget* widget) { |
| 99 DialogClientView* client = new DialogClientView(widget, GetContentsView()); | 99 DialogClientView* client = new DialogClientView(widget, GetContentsView()); |
| 100 client->SetButtonRowInsets(gfx::Insets()); | 100 client->SetButtonRowInsets(button_row_insets_); |
| 101 widget->non_client_view()->set_mirror_client_in_rtl(mirror_arrow_in_rtl_); | 101 widget->non_client_view()->set_mirror_client_in_rtl(mirror_arrow_in_rtl_); |
| 102 return client; | 102 return client; |
| 103 } | 103 } |
| 104 | 104 |
| 105 NonClientFrameView* BubbleDialogDelegateView::CreateNonClientFrameView( | 105 NonClientFrameView* BubbleDialogDelegateView::CreateNonClientFrameView( |
| 106 Widget* widget) { | 106 Widget* widget) { |
| 107 BubbleFrameView* frame = new BubbleFrameView(title_margins_, margins_); | 107 BubbleFrameView* frame = new BubbleFrameView(title_margins_, margins_); |
| 108 // Note: In CreateBubble, the call to SizeToContents() will cause | 108 // Note: In CreateBubble, the call to SizeToContents() will cause |
| 109 // the relayout that this call requires. | 109 // the relayout that this call requires. |
| 110 frame->SetTitleFontList(GetTitleFontList()); | 110 frame->SetTitleFontList(GetTitleFontList()); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // http://crbug.com/474622 for details. | 321 // http://crbug.com/474622 for details. |
| 322 if (widget == GetWidget() && visible) { | 322 if (widget == GetWidget() && visible) { |
| 323 ui::AXNodeData node_data; | 323 ui::AXNodeData node_data; |
| 324 GetAccessibleNodeData(&node_data); | 324 GetAccessibleNodeData(&node_data); |
| 325 if (node_data.role == ui::AX_ROLE_ALERT_DIALOG) | 325 if (node_data.role == ui::AX_ROLE_ALERT_DIALOG) |
| 326 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 326 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
| 327 } | 327 } |
| 328 } | 328 } |
| 329 | 329 |
| 330 } // namespace views | 330 } // namespace views |
| OLD | NEW |