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

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

Issue 1586833002: Convert Pass()→std::move() for iOS build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental //base change Created 4 years, 11 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 | « ios/web/app/web_main_loop.mm ('k') | ios/web/interstitials/native_web_interstitial_impl.mm » ('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 #import "ios/web/interstitials/html_web_interstitial_impl.h" 5 #import "ios/web/interstitials/html_web_interstitial_impl.h"
6 6
7 #include <utility>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
9 #include "ios/web/interstitials/web_interstitial_facade_delegate.h" 11 #include "ios/web/interstitials/web_interstitial_facade_delegate.h"
10 #include "ios/web/public/interstitials/web_interstitial_delegate.h" 12 #include "ios/web/public/interstitials/web_interstitial_delegate.h"
11 #include "ios/web/public/web_state/ui/crw_web_view_content_view.h" 13 #include "ios/web/public/web_state/ui/crw_web_view_content_view.h"
12 #import "ios/web/web_state/ui/crw_simple_web_view_controller.h" 14 #import "ios/web/web_state/ui/crw_simple_web_view_controller.h"
13 #include "ios/web/web_state/web_state_impl.h" 15 #include "ios/web/web_state/web_state_impl.h"
14 #import "ios/web/web_state/web_view_internal_creation_util.h" 16 #import "ios/web/web_state/web_view_internal_creation_util.h"
15 #import "net/base/mac/url_conversions.h" 17 #import "net/base/mac/url_conversions.h"
16 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 namespace web { 62 namespace web {
61 63
62 // static 64 // static
63 WebInterstitial* WebInterstitial::CreateHtmlInterstitial( 65 WebInterstitial* WebInterstitial::CreateHtmlInterstitial(
64 WebState* web_state, 66 WebState* web_state,
65 bool new_navigation, 67 bool new_navigation,
66 const GURL& url, 68 const GURL& url,
67 scoped_ptr<HtmlWebInterstitialDelegate> delegate) { 69 scoped_ptr<HtmlWebInterstitialDelegate> delegate) {
68 WebStateImpl* web_state_impl = static_cast<WebStateImpl*>(web_state); 70 WebStateImpl* web_state_impl = static_cast<WebStateImpl*>(web_state);
69 return new HtmlWebInterstitialImpl(web_state_impl, new_navigation, url, 71 return new HtmlWebInterstitialImpl(web_state_impl, new_navigation, url,
70 delegate.Pass()); 72 std::move(delegate));
71 } 73 }
72 74
73 HtmlWebInterstitialImpl::HtmlWebInterstitialImpl( 75 HtmlWebInterstitialImpl::HtmlWebInterstitialImpl(
74 WebStateImpl* web_state, 76 WebStateImpl* web_state,
75 bool new_navigation, 77 bool new_navigation,
76 const GURL& url, 78 const GURL& url,
77 scoped_ptr<HtmlWebInterstitialDelegate> delegate) 79 scoped_ptr<HtmlWebInterstitialDelegate> delegate)
78 : WebInterstitialImpl(web_state, new_navigation, url), 80 : WebInterstitialImpl(web_state, new_navigation, url),
79 delegate_(delegate.Pass()) { 81 delegate_(std::move(delegate)) {
80 DCHECK(delegate_); 82 DCHECK(delegate_);
81 } 83 }
82 84
83 HtmlWebInterstitialImpl::~HtmlWebInterstitialImpl() { 85 HtmlWebInterstitialImpl::~HtmlWebInterstitialImpl() {
84 } 86 }
85 87
86 void HtmlWebInterstitialImpl::CommandReceivedFromWebView(NSString* command) { 88 void HtmlWebInterstitialImpl::CommandReceivedFromWebView(NSString* command) {
87 delegate_->CommandReceived(base::SysNSStringToUTF8(command)); 89 delegate_->CommandReceived(base::SysNSStringToUTF8(command));
88 } 90 }
89 91
(...skipping 27 matching lines...) Expand all
117 } 119 }
118 120
119 void HtmlWebInterstitialImpl::EvaluateJavaScript( 121 void HtmlWebInterstitialImpl::EvaluateJavaScript(
120 NSString* script, 122 NSString* script,
121 JavaScriptCompletion completionHandler) { 123 JavaScriptCompletion completionHandler) {
122 [web_view_controller_ evaluateJavaScript:script 124 [web_view_controller_ evaluateJavaScript:script
123 stringResultHandler:completionHandler]; 125 stringResultHandler:completionHandler];
124 } 126 }
125 127
126 } // namespace web 128 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/app/web_main_loop.mm ('k') | ios/web/interstitials/native_web_interstitial_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698