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

Side by Side Diff: ios/chrome/browser/tab_parenting_global_observer.cc

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add header 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
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 "ios/chrome/browser/tab_parenting_global_observer.h" 5 #include "ios/chrome/browser/tab_parenting_global_observer.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 8
9 TabParentingGlobalObserver* TabParentingGlobalObserver::GetInstance() { 9 TabParentingGlobalObserver* TabParentingGlobalObserver::GetInstance() {
10 return base::Singleton<TabParentingGlobalObserver>::get(); 10 return base::Singleton<TabParentingGlobalObserver>::get();
11 } 11 }
12 12
13 scoped_ptr<base::CallbackList<void(web::WebState*)>::Subscription> 13 std::unique_ptr<base::CallbackList<void(web::WebState*)>::Subscription>
14 TabParentingGlobalObserver::RegisterCallback(const OnTabParentedCallback& cb) { 14 TabParentingGlobalObserver::RegisterCallback(const OnTabParentedCallback& cb) {
15 return on_tab_parented_callback_list_.Add(cb); 15 return on_tab_parented_callback_list_.Add(cb);
16 } 16 }
17 17
18 void TabParentingGlobalObserver::OnTabParented(web::WebState* web_state) { 18 void TabParentingGlobalObserver::OnTabParented(web::WebState* web_state) {
19 on_tab_parented_callback_list_.Notify(web_state); 19 on_tab_parented_callback_list_.Notify(web_state);
20 } 20 }
21 21
22 TabParentingGlobalObserver::TabParentingGlobalObserver() {} 22 TabParentingGlobalObserver::TabParentingGlobalObserver() {}
23 23
24 TabParentingGlobalObserver::~TabParentingGlobalObserver() {} 24 TabParentingGlobalObserver::~TabParentingGlobalObserver() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698