| 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 #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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 FOR_EACH_OBSERVER(WebStateObserver, observers_, DidStartLoading()); | 193 FOR_EACH_OBSERVER(WebStateObserver, observers_, DidStartLoading()); |
| 194 } else { | 194 } else { |
| 195 FOR_EACH_OBSERVER(WebStateObserver, observers_, DidStopLoading()); | 195 FOR_EACH_OBSERVER(WebStateObserver, observers_, DidStopLoading()); |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 | 198 |
| 199 bool WebStateImpl::IsLoading() const { | 199 bool WebStateImpl::IsLoading() const { |
| 200 return is_loading_; | 200 return is_loading_; |
| 201 } | 201 } |
| 202 | 202 |
| 203 double WebStateImpl::GetLoadingProgress() const { |
| 204 return [web_controller_ loadingProgress]; |
| 205 } |
| 206 |
| 203 bool WebStateImpl::IsBeingDestroyed() const { | 207 bool WebStateImpl::IsBeingDestroyed() const { |
| 204 return is_being_destroyed_; | 208 return is_being_destroyed_; |
| 205 } | 209 } |
| 206 | 210 |
| 207 void WebStateImpl::OnPageLoaded(const GURL& url, bool load_success) { | 211 void WebStateImpl::OnPageLoaded(const GURL& url, bool load_success) { |
| 208 if (facade_delegate_) | 212 if (facade_delegate_) |
| 209 facade_delegate_->OnPageLoaded(); | 213 facade_delegate_->OnPageLoaded(); |
| 210 | 214 |
| 211 PageLoadCompletionStatus load_completion_status = | 215 PageLoadCompletionStatus load_completion_status = |
| 212 load_success ? PageLoadCompletionStatus::SUCCESS | 216 load_success ? PageLoadCompletionStatus::SUCCESS |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 const LoadCommittedDetails& load_details) { | 645 const LoadCommittedDetails& load_details) { |
| 642 FOR_EACH_OBSERVER(WebStateObserver, observers_, | 646 FOR_EACH_OBSERVER(WebStateObserver, observers_, |
| 643 NavigationItemCommitted(load_details)); | 647 NavigationItemCommitted(load_details)); |
| 644 } | 648 } |
| 645 | 649 |
| 646 WebState* WebStateImpl::GetWebState() { | 650 WebState* WebStateImpl::GetWebState() { |
| 647 return this; | 651 return this; |
| 648 } | 652 } |
| 649 | 653 |
| 650 } // namespace web | 654 } // namespace web |
| OLD | NEW |