Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: ui/views/window/dialog_delegate.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/window/dialog_client_view_unittest.cc ('k') | ui/views/window/non_client_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/window/dialog_client_view_unittest.cc ('k') | ui/views/window/non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698