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

Side by Side Diff: ui/views/bubble/bubble_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/bubble/bubble_border_unittest.cc ('k') | ui/views/bubble/bubble_delegate_unittest.cc » ('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/bubble/bubble_delegate.h" 5 #include "ui/views/bubble/bubble_delegate.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/accessibility/ax_view_state.h" 8 #include "ui/accessibility/ax_view_state.h"
9 #include "ui/base/default_style.h" 9 #include "ui/base/default_style.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0, kPanelHorizMargin), 125 gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0, kPanelHorizMargin),
126 margins()); 126 margins());
127 // Note: In CreateBubble, the call to SizeToContents() will cause 127 // Note: In CreateBubble, the call to SizeToContents() will cause
128 // the relayout that this call requires. 128 // the relayout that this call requires.
129 frame->SetTitleFontList(GetTitleFontList()); 129 frame->SetTitleFontList(GetTitleFontList());
130 frame->SetFootnoteView(CreateFootnoteView()); 130 frame->SetFootnoteView(CreateFootnoteView());
131 131
132 BubbleBorder::Arrow adjusted_arrow = arrow(); 132 BubbleBorder::Arrow adjusted_arrow = arrow();
133 if (base::i18n::IsRTL()) 133 if (base::i18n::IsRTL())
134 adjusted_arrow = BubbleBorder::horizontal_mirror(adjusted_arrow); 134 adjusted_arrow = BubbleBorder::horizontal_mirror(adjusted_arrow);
135 frame->SetBubbleBorder(scoped_ptr<BubbleBorder>( 135 frame->SetBubbleBorder(std::unique_ptr<BubbleBorder>(
136 new BubbleBorder(adjusted_arrow, shadow(), color()))); 136 new BubbleBorder(adjusted_arrow, shadow(), color())));
137 return frame; 137 return frame;
138 } 138 }
139 139
140 void BubbleDelegateView::GetAccessibleState(ui::AXViewState* state) { 140 void BubbleDelegateView::GetAccessibleState(ui::AXViewState* state) {
141 state->role = ui::AX_ROLE_DIALOG; 141 state->role = ui::AX_ROLE_DIALOG;
142 } 142 }
143 143
144 const char* BubbleDelegateView::GetClassName() const { 144 const char* BubbleDelegateView::GetClassName() const {
145 return kViewClassName; 145 return kViewClassName;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // http://crbug.com/474622 for details. 326 // http://crbug.com/474622 for details.
327 if (widget == GetWidget() && visible) { 327 if (widget == GetWidget() && visible) {
328 ui::AXViewState state; 328 ui::AXViewState state;
329 GetAccessibleState(&state); 329 GetAccessibleState(&state);
330 if (state.role == ui::AX_ROLE_ALERT_DIALOG) 330 if (state.role == ui::AX_ROLE_ALERT_DIALOG)
331 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 331 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
332 } 332 }
333 } 333 }
334 334
335 } // namespace views 335 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_border_unittest.cc ('k') | ui/views/bubble/bubble_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698