| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 return WidgetDelegate::CreateNonClientFrameView(widget); | 186 return WidgetDelegate::CreateNonClientFrameView(widget); |
| 187 } | 187 } |
| 188 | 188 |
| 189 // static | 189 // static |
| 190 NonClientFrameView* DialogDelegate::CreateDialogFrameView(Widget* widget) { | 190 NonClientFrameView* DialogDelegate::CreateDialogFrameView(Widget* widget) { |
| 191 BubbleFrameView* frame = | 191 BubbleFrameView* frame = |
| 192 new BubbleFrameView(gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, | 192 new BubbleFrameView(gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, |
| 193 0, kButtonHEdgeMarginNew), | 193 0, kButtonHEdgeMarginNew), |
| 194 gfx::Insets()); | 194 gfx::Insets()); |
| 195 const BubbleBorder::Shadow kShadow = BubbleBorder::SMALL_SHADOW; | 195 const BubbleBorder::Shadow kShadow = BubbleBorder::SMALL_SHADOW; |
| 196 scoped_ptr<BubbleBorder> border( | 196 std::unique_ptr<BubbleBorder> border( |
| 197 new BubbleBorder(BubbleBorder::FLOAT, kShadow, gfx::kPlaceholderColor)); | 197 new BubbleBorder(BubbleBorder::FLOAT, kShadow, gfx::kPlaceholderColor)); |
| 198 border->set_use_theme_background_color(true); | 198 border->set_use_theme_background_color(true); |
| 199 frame->SetBubbleBorder(std::move(border)); | 199 frame->SetBubbleBorder(std::move(border)); |
| 200 DialogDelegate* delegate = widget->widget_delegate()->AsDialogDelegate(); | 200 DialogDelegate* delegate = widget->widget_delegate()->AsDialogDelegate(); |
| 201 if (delegate) | 201 if (delegate) |
| 202 frame->SetFootnoteView(delegate->CreateFootnoteView()); | 202 frame->SetFootnoteView(delegate->CreateFootnoteView()); |
| 203 return frame; | 203 return frame; |
| 204 } | 204 } |
| 205 | 205 |
| 206 bool DialogDelegate::UseNewStyleForThisDialog() const { | 206 bool DialogDelegate::UseNewStyleForThisDialog() const { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 state->role = ui::AX_ROLE_DIALOG; | 250 state->role = ui::AX_ROLE_DIALOG; |
| 251 } | 251 } |
| 252 | 252 |
| 253 void DialogDelegateView::ViewHierarchyChanged( | 253 void DialogDelegateView::ViewHierarchyChanged( |
| 254 const ViewHierarchyChangedDetails& details) { | 254 const ViewHierarchyChangedDetails& details) { |
| 255 if (details.is_add && details.child == this && GetWidget()) | 255 if (details.is_add && details.child == this && GetWidget()) |
| 256 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 256 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace views | 259 } // namespace views |
| OLD | NEW |