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

Side by Side Diff: ios/web/interstitials/native_web_interstitial_impl.h

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 #ifndef IOS_WEB_INTERSTITIALS_NATIVE_WEB_INTERSTITIAL_IMPL_H_ 5 #ifndef IOS_WEB_INTERSTITIALS_NATIVE_WEB_INTERSTITIAL_IMPL_H_
6 #define IOS_WEB_INTERSTITIALS_NATIVE_WEB_INTERSTITIAL_IMPL_H_ 6 #define IOS_WEB_INTERSTITIALS_NATIVE_WEB_INTERSTITIAL_IMPL_H_
7 7
8 #include "ios/web/interstitials/web_interstitial_impl.h" 8 #include "ios/web/interstitials/web_interstitial_impl.h"
9 9
10 #include <memory>
11
10 #include "base/ios/weak_nsobject.h" 12 #include "base/ios/weak_nsobject.h"
11 #include "base/mac/scoped_nsobject.h" 13 #include "base/mac/scoped_nsobject.h"
12 14
13 namespace web { 15 namespace web {
14 16
15 class NativeWebInterstitialDelegate; 17 class NativeWebInterstitialDelegate;
16 18
17 // A concrete subclass of WebInterstitialImpl that is used to display 19 // A concrete subclass of WebInterstitialImpl that is used to display
18 // interstitials created via native views. 20 // interstitials created via native views.
19 class NativeWebInterstitialImpl : public WebInterstitialImpl { 21 class NativeWebInterstitialImpl : public WebInterstitialImpl {
20 public: 22 public:
21 NativeWebInterstitialImpl(WebStateImpl* web_state, 23 NativeWebInterstitialImpl(
22 bool new_navigation, 24 WebStateImpl* web_state,
23 const GURL& url, 25 bool new_navigation,
24 scoped_ptr<NativeWebInterstitialDelegate> delegate); 26 const GURL& url,
27 std::unique_ptr<NativeWebInterstitialDelegate> delegate);
25 ~NativeWebInterstitialImpl() override; 28 ~NativeWebInterstitialImpl() override;
26 29
27 // WebInterstitialImpl implementation: 30 // WebInterstitialImpl implementation:
28 CRWContentView* GetContentView() const override; 31 CRWContentView* GetContentView() const override;
29 32
30 protected: 33 protected:
31 // WebInterstitialImpl implementation: 34 // WebInterstitialImpl implementation:
32 void PrepareForDisplay() override; 35 void PrepareForDisplay() override;
33 WebInterstitialDelegate* GetDelegate() const override; 36 WebInterstitialDelegate* GetDelegate() const override;
34 void EvaluateJavaScript(NSString* script, 37 void EvaluateJavaScript(NSString* script,
35 JavaScriptCompletion completionHandler) override; 38 JavaScriptCompletion completionHandler) override;
36 39
37 private: 40 private:
38 // The native interstitial delegate. 41 // The native interstitial delegate.
39 scoped_ptr<NativeWebInterstitialDelegate> delegate_; 42 std::unique_ptr<NativeWebInterstitialDelegate> delegate_;
40 // The transient content view containing interstitial content. 43 // The transient content view containing interstitial content.
41 base::scoped_nsobject<CRWContentView> content_view_; 44 base::scoped_nsobject<CRWContentView> content_view_;
42 }; 45 };
43 46
44 } // namespace web 47 } // namespace web
45 48
46 #endif // IOS_WEB_INTERSTITIALS_NATIVE_WEB_INTERSTITIAL_IMPL_H_ 49 #endif // IOS_WEB_INTERSTITIALS_NATIVE_WEB_INTERSTITIAL_IMPL_H_
OLDNEW
« no previous file with comments | « ios/web/interstitials/html_web_interstitial_impl.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