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

Side by Side Diff: ios/web/public/interstitials/web_interstitial.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: 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 #ifndef IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_H_ 5 #ifndef IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_H_
6 #define IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_H_ 6 #define IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9 9
10 class GURL; 10 class GURL;
11 11
12 namespace gfx { 12 namespace gfx {
13 class Size; 13 class Size;
14 } 14 }
15 15
16 namespace web { 16 namespace web {
17 17
18 class HtmlWebInterstitialDelegate; 18 class HtmlWebInterstitialDelegate;
(...skipping 10 matching lines...) Expand all
29 class WebInterstitial { 29 class WebInterstitial {
30 public: 30 public:
31 // Creates an interstitial page to show in |web_state|. Takes ownership of 31 // Creates an interstitial page to show in |web_state|. Takes ownership of
32 // |delegate|. Reloading the interstitial page will result in a new navigation 32 // |delegate|. Reloading the interstitial page will result in a new navigation
33 // to |url|. The pointers returned by these functions are self-owning; they 33 // to |url|. The pointers returned by these functions are self-owning; they
34 // manage their own deletion after calling |Show()|. 34 // manage their own deletion after calling |Show()|.
35 static WebInterstitial* CreateHtmlInterstitial( 35 static WebInterstitial* CreateHtmlInterstitial(
36 WebState* web_state, 36 WebState* web_state,
37 bool new_navigation, 37 bool new_navigation,
38 const GURL& url, 38 const GURL& url,
39 scoped_ptr<HtmlWebInterstitialDelegate> delegate); 39 std::unique_ptr<HtmlWebInterstitialDelegate> delegate);
40 static WebInterstitial* CreateNativeInterstitial( 40 static WebInterstitial* CreateNativeInterstitial(
41 WebState* web_state, 41 WebState* web_state,
42 bool new_navigation, 42 bool new_navigation,
43 const GURL& url, 43 const GURL& url,
44 scoped_ptr<NativeWebInterstitialDelegate> delegate); 44 std::unique_ptr<NativeWebInterstitialDelegate> delegate);
45 45
46 // Retrieves the WebInterstitial if any associated with the specified 46 // Retrieves the WebInterstitial if any associated with the specified
47 // |web_state|. 47 // |web_state|.
48 static WebInterstitial* GetWebInterstitial(WebState* web_state); 48 static WebInterstitial* GetWebInterstitial(WebState* web_state);
49 49
50 virtual ~WebInterstitial() {} 50 virtual ~WebInterstitial() {}
51 51
52 // Shows the interstitial page in the WebState. 52 // Shows the interstitial page in the WebState.
53 virtual void Show() = 0; 53 virtual void Show() = 0;
54 54
55 // Hides the interstitial page. 55 // Hides the interstitial page.
56 virtual void Hide() = 0; 56 virtual void Hide() = 0;
57 57
58 // Reverts to the page showing before the interstitial. 58 // Reverts to the page showing before the interstitial.
59 // Delegates should call this method when the user has chosen NOT to proceed 59 // Delegates should call this method when the user has chosen NOT to proceed
60 // to the target URL. 60 // to the target URL.
61 // Warning: 'this' has been deleted when this method returns. 61 // Warning: 'this' has been deleted when this method returns.
62 virtual void DontProceed() = 0; 62 virtual void DontProceed() = 0;
63 63
64 // Delegates should call this method when the user has chosen to proceed to 64 // Delegates should call this method when the user has chosen to proceed to
65 // the target URL. 65 // the target URL.
66 // Warning: 'this' has been deleted when this method returns. 66 // Warning: 'this' has been deleted when this method returns.
67 virtual void Proceed() = 0; 67 virtual void Proceed() = 0;
68 }; 68 };
69 69
70 } // namespace web 70 } // namespace web
71 71
72 #endif // IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_H_ 72 #endif // IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698