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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « ios/web/web_state/web_state.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "ios/web/web_state/web_state_impl.h" 5 #include "ios/web/web_state/web_state_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 15 matching lines...) Expand all
26 #import "ios/web/web_state/ui/crw_web_controller.h" 26 #import "ios/web/web_state/ui/crw_web_controller.h"
27 #import "ios/web/web_state/ui/crw_web_controller_container_view.h" 27 #import "ios/web/web_state/ui/crw_web_controller_container_view.h"
28 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h" 28 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h"
29 #include "ios/web/web_state/web_state_facade_delegate.h" 29 #include "ios/web/web_state/web_state_facade_delegate.h"
30 #import "ios/web/webui/web_ui_ios_controller_factory_registry.h" 30 #import "ios/web/webui/web_ui_ios_controller_factory_registry.h"
31 #import "ios/web/webui/web_ui_ios_impl.h" 31 #import "ios/web/webui/web_ui_ios_impl.h"
32 #include "net/http/http_response_headers.h" 32 #include "net/http/http_response_headers.h"
33 33
34 namespace web { 34 namespace web {
35 35
36 /* static */
37 std::unique_ptr<WebState> WebState::Create(const CreateParams& params) {
38 std::unique_ptr<WebStateImpl> web_state(
39 new WebStateImpl(params.browser_state));
40
41 NSString* window_name = nil;
42 NSString* opener_id = nil;
43 BOOL opened_by_dom = NO;
44 int opener_navigation_index = 0;
45 web_state->GetNavigationManagerImpl().InitializeSession(
46 window_name, opener_id, opened_by_dom, opener_navigation_index);
47
48 return std::unique_ptr<WebState>(web_state.release());
49 }
50
36 WebStateImpl::WebStateImpl(BrowserState* browser_state) 51 WebStateImpl::WebStateImpl(BrowserState* browser_state)
37 : delegate_(nullptr), 52 : delegate_(nullptr),
38 is_loading_(false), 53 is_loading_(false),
39 is_being_destroyed_(false), 54 is_being_destroyed_(false),
40 facade_delegate_(nullptr), 55 facade_delegate_(nullptr),
41 web_controller_(nil), 56 web_controller_(nil),
42 navigation_manager_(this, browser_state), 57 navigation_manager_(this, browser_state),
43 interstitial_(nullptr), 58 interstitial_(nullptr),
44 weak_factory_(this) { 59 weak_factory_(this) {
45 GlobalWebStateEventTracker::GetInstance()->OnWebStateCreated(this); 60 GlobalWebStateEventTracker::GetInstance()->OnWebStateCreated(this);
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 const LoadCommittedDetails& load_details) { 641 const LoadCommittedDetails& load_details) {
627 FOR_EACH_OBSERVER(WebStateObserver, observers_, 642 FOR_EACH_OBSERVER(WebStateObserver, observers_,
628 NavigationItemCommitted(load_details)); 643 NavigationItemCommitted(load_details));
629 } 644 }
630 645
631 WebState* WebStateImpl::GetWebState() { 646 WebState* WebStateImpl::GetWebState() {
632 return this; 647 return this;
633 } 648 }
634 649
635 } // namespace web 650 } // namespace web
OLDNEW
« 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