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

Side by Side Diff: ui/views/bubble/bubble_frame_view.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_frame_view.h ('k') | ui/views/bubble/bubble_frame_view_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_frame_view.h" 5 #include "ui/views/bubble/bubble_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 OnPaintBorder(recorder.canvas()); 357 OnPaintBorder(recorder.canvas());
358 } 358 }
359 359
360 void BubbleFrameView::ButtonPressed(Button* sender, const ui::Event& event) { 360 void BubbleFrameView::ButtonPressed(Button* sender, const ui::Event& event) {
361 if (sender == close_) { 361 if (sender == close_) {
362 close_button_clicked_ = true; 362 close_button_clicked_ = true;
363 GetWidget()->Close(); 363 GetWidget()->Close();
364 } 364 }
365 } 365 }
366 366
367 void BubbleFrameView::SetBubbleBorder(scoped_ptr<BubbleBorder> border) { 367 void BubbleFrameView::SetBubbleBorder(std::unique_ptr<BubbleBorder> border) {
368 bubble_border_ = border.get(); 368 bubble_border_ = border.get();
369 SetBorder(std::move(border)); 369 SetBorder(std::move(border));
370 370
371 // Update the background, which relies on the border. 371 // Update the background, which relies on the border.
372 set_background(new views::BubbleBackground(bubble_border_)); 372 set_background(new views::BubbleBackground(bubble_border_));
373 } 373 }
374 374
375 void BubbleFrameView::SetFootnoteView(View* view) { 375 void BubbleFrameView::SetFootnoteView(View* view) {
376 if (!view) 376 if (!view)
377 return; 377 return;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 size.Enlarge(client_insets.width(), client_insets.height()); 511 size.Enlarge(client_insets.width(), client_insets.height());
512 size.SetToMax(gfx::Size(title_bar_width, 0)); 512 size.SetToMax(gfx::Size(title_bar_width, 0));
513 513
514 if (footnote_container_) 514 if (footnote_container_)
515 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); 515 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width()));
516 516
517 return size; 517 return size;
518 } 518 }
519 519
520 } // namespace views 520 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view.h ('k') | ui/views/bubble/bubble_frame_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698