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

Unified Diff: ios/web/web_state/web_state_impl.mm

Issue 1901343002: [ios] Do not use private web// API in ios_web_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing include 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 side-by-side diff with in-line comments
Download patch
« ios/web/shell/view_controller.mm ('K') | « ios/web/web_state/web_state.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/web_state_impl.mm
diff --git a/ios/web/web_state/web_state_impl.mm b/ios/web/web_state/web_state_impl.mm
index 09ca232373b4bde6179cf9590e7373fc34ac1679..22e5f8b89f0a4c80c9172b87c80530966180405b 100644
--- a/ios/web/web_state/web_state_impl.mm
+++ b/ios/web/web_state/web_state_impl.mm
@@ -33,6 +33,20 @@
namespace web {
+/* static */
+std::unique_ptr<WebState> WebState::Create(const CreateParams& params) {
+ WebStateImpl* web_state(new WebStateImpl(params.browser_state));
rohitrao (ping after 24h) 2016/04/21 00:17:18 Is it worth wrapping this in a unique_ptr too?
Eugene But (OOO till 7-30) 2016/04/21 00:48:16 Done.
+
+ NSString* window_name = nil;
+ NSString* opener_id = nil;
+ BOOL opened_by_dom = NO;
+ int opener_navigation_index = 0;
+ web_state->GetNavigationManagerImpl().InitializeSession(
+ window_name, opener_id, opened_by_dom, opener_navigation_index);
+
+ return std::unique_ptr<WebState>(web_state);
rohitrao (ping after 24h) 2016/04/21 00:17:18 And then using web_state.release() here?
Eugene But (OOO till 7-30) 2016/04/21 00:48:16 Done.
+}
+
WebStateImpl::WebStateImpl(BrowserState* browser_state)
: delegate_(nullptr),
is_loading_(false),
« ios/web/shell/view_controller.mm ('K') | « ios/web/web_state/web_state.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698