OLD | NEW |
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 #import "ios/web/web_state/web_state_impl.h" | 5 #import "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/logging.h" | 10 #include "base/logging.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 namespace web { | 43 namespace web { |
44 | 44 |
45 /* static */ | 45 /* static */ |
46 std::unique_ptr<WebState> WebState::Create(const CreateParams& params) { | 46 std::unique_ptr<WebState> WebState::Create(const CreateParams& params) { |
47 std::unique_ptr<WebStateImpl> web_state( | 47 std::unique_ptr<WebStateImpl> web_state( |
48 new WebStateImpl(params.browser_state)); | 48 new WebStateImpl(params.browser_state)); |
49 | 49 |
50 // Initialized the new session. | 50 // Initialized the new session. |
51 NSString* window_name = nil; | 51 NSString* window_name = nil; |
52 NSString* opener_id = nil; | |
53 BOOL opened_by_dom = NO; | 52 BOOL opened_by_dom = NO; |
54 int opener_navigation_index = 0; | 53 web_state->GetNavigationManagerImpl().InitializeSession(window_name, |
55 web_state->GetNavigationManagerImpl().InitializeSession( | 54 opened_by_dom); |
56 window_name, opener_id, opened_by_dom, opener_navigation_index); | |
57 | 55 |
58 // This std::move is required to compile with the version of clang shipping | 56 // This std::move is required to compile with the version of clang shipping |
59 // with Xcode 8.0+. Evalute whether the issue is fixed once a new version of | 57 // with Xcode 8.0+. Evalute whether the issue is fixed once a new version of |
60 // Xcode is released. | 58 // Xcode is released. |
61 return std::move(web_state); | 59 return std::move(web_state); |
62 } | 60 } |
63 | 61 |
64 /* static */ | 62 /* static */ |
65 std::unique_ptr<WebState> WebState::Create(const CreateParams& params, | 63 std::unique_ptr<WebState> WebState::Create(const CreateParams& params, |
66 CRWSessionStorage* session_storage) { | 64 CRWSessionStorage* session_storage) { |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 const LoadCommittedDetails& load_details) { | 729 const LoadCommittedDetails& load_details) { |
732 for (auto& observer : observers_) | 730 for (auto& observer : observers_) |
733 observer.NavigationItemCommitted(load_details); | 731 observer.NavigationItemCommitted(load_details); |
734 } | 732 } |
735 | 733 |
736 WebState* WebStateImpl::GetWebState() { | 734 WebState* WebStateImpl::GetWebState() { |
737 return this; | 735 return this; |
738 } | 736 } |
739 | 737 |
740 } // namespace web | 738 } // namespace web |
OLD | NEW |