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

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

Issue 2281803002: [ios] Removed deprecated JS execution API. (Closed)
Patch Set: Merged with master Created 4 years, 3 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 | « no previous file | ios/web/interstitials/html_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 #ifndef IOS_WEB_INTERSTITIALS_HTML_WEB_INTERSTITIAL_IMPL_H_ 5 #ifndef IOS_WEB_INTERSTITIALS_HTML_WEB_INTERSTITIAL_IMPL_H_
6 #define IOS_WEB_INTERSTITIALS_HTML_WEB_INTERSTITIAL_IMPL_H_ 6 #define IOS_WEB_INTERSTITIALS_HTML_WEB_INTERSTITIAL_IMPL_H_
7 7
8 #import <WebKit/WebKit.h> 8 #import <WebKit/WebKit.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 21 matching lines...) Expand all
32 // receives a JavaScript command. 32 // receives a JavaScript command.
33 void CommandReceivedFromWebView(NSString* command); 33 void CommandReceivedFromWebView(NSString* command);
34 34
35 // WebInterstitialImpl implementation: 35 // WebInterstitialImpl implementation:
36 CRWContentView* GetContentView() const override; 36 CRWContentView* GetContentView() const override;
37 37
38 protected: 38 protected:
39 // WebInterstitialImpl implementation: 39 // WebInterstitialImpl implementation:
40 void PrepareForDisplay() override; 40 void PrepareForDisplay() override;
41 WebInterstitialDelegate* GetDelegate() const override; 41 WebInterstitialDelegate* GetDelegate() const override;
42 void EvaluateJavaScript(NSString* script,
43 JavaScriptCompletion completionHandler) override;
44 void ExecuteJavaScript(NSString* script, 42 void ExecuteJavaScript(NSString* script,
45 JavaScriptResultBlock completion_handler) override; 43 JavaScriptResultBlock completion_handler) override;
46 44
47 private: 45 private:
48 // The HTML interstitial delegate. 46 // The HTML interstitial delegate.
49 std::unique_ptr<HtmlWebInterstitialDelegate> delegate_; 47 std::unique_ptr<HtmlWebInterstitialDelegate> delegate_;
50 // The |web_view_|'s delegate. Used to forward JavaScript commands 48 // The |web_view_|'s delegate. Used to forward JavaScript commands
51 // resulting from user interaction with the interstitial content. 49 // resulting from user interaction with the interstitial content.
52 base::scoped_nsprotocol<id<WKNavigationDelegate>> web_view_delegate_; 50 base::scoped_nsprotocol<id<WKNavigationDelegate>> web_view_delegate_;
53 // The web view used to show the content. View needs to be resized by the 51 // The web view used to show the content. View needs to be resized by the
54 // caller. 52 // caller.
55 base::scoped_nsobject<WKWebView> web_view_; 53 base::scoped_nsobject<WKWebView> web_view_;
56 // The CRWContentView used to display |web_view_controller_|'s view. 54 // The CRWContentView used to display |web_view_controller_|'s view.
57 base::scoped_nsobject<CRWContentView> content_view_; 55 base::scoped_nsobject<CRWContentView> content_view_;
58 }; 56 };
59 57
60 } // namespace web 58 } // namespace web
61 59
62 #endif // IOS_WEB_INTERSTITIALS_HTML_WEB_INTERSTITIAL_IMPL_H_ 60 #endif // IOS_WEB_INTERSTITIALS_HTML_WEB_INTERSTITIAL_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | ios/web/interstitials/html_web_interstitial_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698