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

Side by Side Diff: ios/web/interstitials/html_web_interstitial_impl.mm

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? 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 #import "ios/web/interstitials/html_web_interstitial_impl.h" 5 #import "ios/web/interstitials/html_web_interstitial_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 #pragma mark - 71 #pragma mark -
72 72
73 namespace web { 73 namespace web {
74 74
75 // static 75 // static
76 WebInterstitial* WebInterstitial::CreateHtmlInterstitial( 76 WebInterstitial* WebInterstitial::CreateHtmlInterstitial(
77 WebState* web_state, 77 WebState* web_state,
78 bool new_navigation, 78 bool new_navigation,
79 const GURL& url, 79 const GURL& url,
80 scoped_ptr<HtmlWebInterstitialDelegate> delegate) { 80 std::unique_ptr<HtmlWebInterstitialDelegate> delegate) {
81 WebStateImpl* web_state_impl = static_cast<WebStateImpl*>(web_state); 81 WebStateImpl* web_state_impl = static_cast<WebStateImpl*>(web_state);
82 return new HtmlWebInterstitialImpl(web_state_impl, new_navigation, url, 82 return new HtmlWebInterstitialImpl(web_state_impl, new_navigation, url,
83 std::move(delegate)); 83 std::move(delegate));
84 } 84 }
85 85
86 HtmlWebInterstitialImpl::HtmlWebInterstitialImpl( 86 HtmlWebInterstitialImpl::HtmlWebInterstitialImpl(
87 WebStateImpl* web_state, 87 WebStateImpl* web_state,
88 bool new_navigation, 88 bool new_navigation,
89 const GURL& url, 89 const GURL& url,
90 scoped_ptr<HtmlWebInterstitialDelegate> delegate) 90 std::unique_ptr<HtmlWebInterstitialDelegate> delegate)
91 : WebInterstitialImpl(web_state, new_navigation, url), 91 : WebInterstitialImpl(web_state, new_navigation, url),
92 delegate_(std::move(delegate)) { 92 delegate_(std::move(delegate)) {
93 DCHECK(delegate_); 93 DCHECK(delegate_);
94 } 94 }
95 95
96 HtmlWebInterstitialImpl::~HtmlWebInterstitialImpl() { 96 HtmlWebInterstitialImpl::~HtmlWebInterstitialImpl() {
97 } 97 }
98 98
99 void HtmlWebInterstitialImpl::CommandReceivedFromWebView(NSString* command) { 99 void HtmlWebInterstitialImpl::CommandReceivedFromWebView(NSString* command) {
100 delegate_->CommandReceived(base::SysNSStringToUTF8(command)); 100 delegate_->CommandReceived(base::SysNSStringToUTF8(command));
(...skipping 24 matching lines...) Expand all
125 return delegate_.get(); 125 return delegate_.get();
126 } 126 }
127 127
128 void HtmlWebInterstitialImpl::EvaluateJavaScript( 128 void HtmlWebInterstitialImpl::EvaluateJavaScript(
129 NSString* script, 129 NSString* script,
130 JavaScriptCompletion completionHandler) { 130 JavaScriptCompletion completionHandler) {
131 web::EvaluateJavaScript(web_view_, script, completionHandler); 131 web::EvaluateJavaScript(web_view_, script, completionHandler);
132 } 132 }
133 133
134 } // namespace web 134 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/interstitials/html_web_interstitial_impl.h ('k') | ios/web/interstitials/native_web_interstitial_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698