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

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: Addressed review comments 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
« no previous file with comments | « 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..6e764ebc066390710fade245e34fd57d0197b8ad 100644
--- a/ios/web/web_state/web_state_impl.mm
+++ b/ios/web/web_state/web_state_impl.mm
@@ -33,6 +33,21 @@
namespace web {
+/* static */
+std::unique_ptr<WebState> WebState::Create(const CreateParams& params) {
+ std::unique_ptr<WebStateImpl> web_state(
+ new WebStateImpl(params.browser_state));
+
+ 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.release());
+}
+
WebStateImpl::WebStateImpl(BrowserState* browser_state)
: delegate_(nullptr),
is_loading_(false),
« no previous file with comments | « 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