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

Side by Side Diff: components/bubble/bubble_controller.cc

Issue 1921973002: Convert //components/[a-e]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 | « components/bubble/bubble_controller.h ('k') | components/bubble/bubble_delegate.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/bubble/bubble_controller.h" 5 #include "components/bubble/bubble_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "components/bubble/bubble_delegate.h" 9 #include "components/bubble/bubble_delegate.h"
10 #include "components/bubble/bubble_manager.h" 10 #include "components/bubble/bubble_manager.h"
11 #include "components/bubble/bubble_ui.h" 11 #include "components/bubble/bubble_ui.h"
12 12
13 BubbleController::BubbleController(BubbleManager* manager, 13 BubbleController::BubbleController(BubbleManager* manager,
14 scoped_ptr<BubbleDelegate> delegate) 14 std::unique_ptr<BubbleDelegate> delegate)
15 : manager_(manager), delegate_(std::move(delegate)) { 15 : manager_(manager), delegate_(std::move(delegate)) {
16 DCHECK(manager_); 16 DCHECK(manager_);
17 DCHECK(delegate_); 17 DCHECK(delegate_);
18 } 18 }
19 19
20 BubbleController::~BubbleController() { 20 BubbleController::~BubbleController() {
21 if (bubble_ui_) 21 if (bubble_ui_)
22 ShouldClose(BUBBLE_CLOSE_FORCED); 22 ShouldClose(BUBBLE_CLOSE_FORCED);
23 } 23 }
24 24
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 DCHECK(bubble_ui_); 65 DCHECK(bubble_ui_);
66 return delegate_->OwningFrame() == frame; 66 return delegate_->OwningFrame() == frame;
67 } 67 }
68 68
69 void BubbleController::DoClose(BubbleCloseReason reason) { 69 void BubbleController::DoClose(BubbleCloseReason reason) {
70 DCHECK(bubble_ui_); 70 DCHECK(bubble_ui_);
71 bubble_ui_->Close(); 71 bubble_ui_->Close();
72 bubble_ui_.reset(); 72 bubble_ui_.reset();
73 delegate_->DidClose(reason); 73 delegate_->DidClose(reason);
74 } 74 }
OLDNEW
« no previous file with comments | « components/bubble/bubble_controller.h ('k') | components/bubble/bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698