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 "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "ui/accessibility/ax_node_data.h" | 8 #include "ui/accessibility/ax_node_data.h" |
9 #include "ui/base/default_style.h" | 9 #include "ui/base/default_style.h" |
10 #include "ui/base/material_design/material_design_controller.h" | 10 #include "ui/base/material_design/material_design_controller.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->set_button_row_insets(gfx::Insets()); | 100 client->SetButtonRowInsets(gfx::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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 // http://crbug.com/474622 for details. | 320 // http://crbug.com/474622 for details. |
321 if (widget == GetWidget() && visible) { | 321 if (widget == GetWidget() && visible) { |
322 ui::AXNodeData node_data; | 322 ui::AXNodeData node_data; |
323 GetAccessibleNodeData(&node_data); | 323 GetAccessibleNodeData(&node_data); |
324 if (node_data.role == ui::AX_ROLE_ALERT_DIALOG) | 324 if (node_data.role == ui::AX_ROLE_ALERT_DIALOG) |
325 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 325 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
326 } | 326 } |
327 } | 327 } |
328 | 328 |
329 } // namespace views | 329 } // namespace views |
OLD | NEW |