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

Unified Diff: ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.mm

Issue 2859363002: [ios clean] Adds Progress Bar to Toolbar. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.mm
diff --git a/ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.mm b/ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.mm
index 4a3bfc69551dd0bf903a0e51bd36a58d05f3a7a8..79a1ba67f718449dd241a534a693a3f88e0ffbaa 100644
--- a/ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.mm
+++ b/ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.mm
@@ -33,8 +33,6 @@
#pragma mark - CRWWebStateObserver
- (void)webState:(web::WebState*)webState didLoadPageWithSuccess:(BOOL)success {
- const GURL& pageURL = webState->GetVisibleURL();
- [self.consumer setCurrentPageText:base::SysUTF8ToNSString(pageURL.spec())];
[self.consumer
setCanGoBack:self.webState->GetNavigationManager()->CanGoBack()];
[self.consumer
@@ -49,6 +47,11 @@
[self.consumer setIsLoading:self.webState->IsLoading()];
}
+- (void)webState:(web::WebState*)webState
+ didChangeLoadingProgress:(double)progress {
+ [self.consumer setProgress:progress];
+}
+
#pragma mark - Setters
- (void)setWebState:(web::WebState*)webState {
@@ -73,12 +76,10 @@
- (void)updateConsumer {
DCHECK(self.webState);
DCHECK(self.consumer);
- const GURL& pageURL = self.webState->GetVisibleURL();
[self.consumer
setCanGoForward:self.webState->GetNavigationManager()->CanGoForward()];
[self.consumer
setCanGoBack:self.webState->GetNavigationManager()->CanGoBack()];
- [self.consumer setCurrentPageText:base::SysUTF8ToNSString(pageURL.spec())];
[self.consumer setIsLoading:self.webState->IsLoading()];
}

Powered by Google App Engine
This is Rietveld 408576698