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

Side by Side Diff: ios/web/web_state/web_state_impl.mm

Issue 1905393002: [ios] Added WebState::GetLoadingProgress web// API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing method 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_impl.h ('k') | ios/web/web_state/web_state_impl_unittest.mm » ('j') | 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_impl.h ('k') | ios/web/web_state/web_state_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698