| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 namespace web { | 42 namespace web { |
| 43 | 43 |
| 44 /* static */ | 44 /* static */ |
| 45 std::unique_ptr<WebState> WebState::Create(const CreateParams& params) { | 45 std::unique_ptr<WebState> WebState::Create(const CreateParams& params) { |
| 46 std::unique_ptr<WebStateImpl> web_state(new WebStateImpl(params)); | 46 std::unique_ptr<WebStateImpl> web_state(new WebStateImpl(params)); |
| 47 | 47 |
| 48 // Initialize the new session. | 48 // Initialize the new session. |
| 49 web_state->GetNavigationManagerImpl().InitializeSession(); | 49 web_state->GetNavigationManagerImpl().InitializeSession(); |
| 50 | 50 |
| 51 // This std::move is required to compile with the version of clang shipping | 51 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required. |
| 52 // with Xcode 8.0+. Evalute whether the issue is fixed once a new version of | |
| 53 // Xcode is released. | |
| 54 return std::move(web_state); | 52 return std::move(web_state); |
| 55 } | 53 } |
| 56 | 54 |
| 57 /* static */ | 55 /* static */ |
| 58 std::unique_ptr<WebState> WebState::Create(const CreateParams& params, | 56 std::unique_ptr<WebState> WebState::Create(const CreateParams& params, |
| 59 CRWSessionStorage* session_storage) { | 57 CRWSessionStorage* session_storage) { |
| 60 std::unique_ptr<WebStateImpl> web_state( | 58 std::unique_ptr<WebStateImpl> web_state( |
| 61 new WebStateImpl(params, session_storage)); | 59 new WebStateImpl(params, session_storage)); |
| 62 | 60 |
| 63 // This std::move is required to compile with the version of clang shipping | 61 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required. |
| 64 // with Xcode 8.0+. Evalute whether the issue is fixed once a new version of | |
| 65 // Xcode is released. | |
| 66 return std::move(web_state); | 62 return std::move(web_state); |
| 67 } | 63 } |
| 68 | 64 |
| 69 WebStateImpl::WebStateImpl(const CreateParams& params) | 65 WebStateImpl::WebStateImpl(const CreateParams& params) |
| 70 : WebStateImpl(params, nullptr) {} | 66 : WebStateImpl(params, nullptr) {} |
| 71 | 67 |
| 72 WebStateImpl::WebStateImpl(const CreateParams& params, | 68 WebStateImpl::WebStateImpl(const CreateParams& params, |
| 73 CRWSessionStorage* session_storage) | 69 CRWSessionStorage* session_storage) |
| 74 : delegate_(nullptr), | 70 : delegate_(nullptr), |
| 75 is_loading_(false), | 71 is_loading_(false), |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 const LoadCommittedDetails& load_details) { | 760 const LoadCommittedDetails& load_details) { |
| 765 for (auto& observer : observers_) | 761 for (auto& observer : observers_) |
| 766 observer.NavigationItemCommitted(load_details); | 762 observer.NavigationItemCommitted(load_details); |
| 767 } | 763 } |
| 768 | 764 |
| 769 WebState* WebStateImpl::GetWebState() { | 765 WebState* WebStateImpl::GetWebState() { |
| 770 return this; | 766 return this; |
| 771 } | 767 } |
| 772 | 768 |
| 773 } // namespace web | 769 } // namespace web |
| OLD | NEW |