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 29 matching lines...) Expand all Loading... |
40 #include "net/http/http_response_headers.h" | 40 #include "net/http/http_response_headers.h" |
41 #include "services/service_manager/public/cpp/interface_registry.h" | 41 #include "services/service_manager/public/cpp/interface_registry.h" |
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 // Initialize the new session. |
51 NSString* window_name = nil; | |
52 BOOL opened_by_dom = NO; | 51 BOOL opened_by_dom = NO; |
53 web_state->GetNavigationManagerImpl().InitializeSession(window_name, | 52 web_state->GetNavigationManagerImpl().InitializeSession(opened_by_dom); |
54 opened_by_dom); | |
55 | 53 |
56 // This std::move is required to compile with the version of clang shipping | 54 // This std::move is required to compile with the version of clang shipping |
57 // with Xcode 8.0+. Evalute whether the issue is fixed once a new version of | 55 // with Xcode 8.0+. Evalute whether the issue is fixed once a new version of |
58 // Xcode is released. | 56 // Xcode is released. |
59 return std::move(web_state); | 57 return std::move(web_state); |
60 } | 58 } |
61 | 59 |
62 /* static */ | 60 /* static */ |
63 std::unique_ptr<WebState> WebState::Create(const CreateParams& params, | 61 std::unique_ptr<WebState> WebState::Create(const CreateParams& params, |
64 CRWSessionStorage* session_storage) { | 62 CRWSessionStorage* session_storage) { |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 const LoadCommittedDetails& load_details) { | 727 const LoadCommittedDetails& load_details) { |
730 for (auto& observer : observers_) | 728 for (auto& observer : observers_) |
731 observer.NavigationItemCommitted(load_details); | 729 observer.NavigationItemCommitted(load_details); |
732 } | 730 } |
733 | 731 |
734 WebState* WebStateImpl::GetWebState() { | 732 WebState* WebStateImpl::GetWebState() { |
735 return this; | 733 return this; |
736 } | 734 } |
737 | 735 |
738 } // namespace web | 736 } // namespace web |
OLD | NEW |