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

Unified Diff: ios/web/web_state/web_state_impl.h

Issue 1851003003: [ios] Added web// public API to let embedder observe loading progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/web/web_state/web_state_impl.h
diff --git a/ios/web/web_state/web_state_impl.h b/ios/web/web_state/web_state_impl.h
index 7924ae25f537d286ea0efb61e4238d03179403a1..276cca662c11b4721aeb753848535749fb6643dd 100644
--- a/ios/web/web_state/web_state_impl.h
+++ b/ios/web/web_state/web_state_impl.h
@@ -41,6 +41,7 @@ struct FaviconURL;
struct LoadCommittedDetails;
class NavigationManager;
class WebInterstitialImpl;
+class WebStateDelegate;
class WebStateFacadeDelegate;
class WebStatePolicyDecider;
class WebUIIOS;
@@ -216,6 +217,8 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
NSString* GetRequestGroupID();
// WebState:
+ WebStateDelegate* GetDelegate() override;
+ void SetDelegate(WebStateDelegate* delegate) override;
UIView* GetView() override;
web::WebViewType GetWebViewType() const override;
BrowserState* GetBrowserState() const override;
@@ -251,6 +254,9 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
// Called to dismiss the currently-displayed transient content view.
void ClearTransientContentView();
+ // Notifies the delegate that the load progress was updated.
+ void SendChangeLoadProgress(double progress);
+
// NavigationManagerDelegate:
void NavigateToPendingEntry() override;
void LoadURLWithParams(const NavigationManager::WebLoadParams&) override;
@@ -267,6 +273,9 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
void RemovePolicyDecider(WebStatePolicyDecider* decider) override;
private:
+ // Unowned delegate.
+ WebStateDelegate* delegate_;
+
// Creates a WebUIIOS object for |url| that is owned by the caller. Returns
// nullptr if |url| does not correspond to a WebUI page.
WebUIIOS* CreateWebUIIOS(const GURL& url);

Powered by Google App Engine
This is Rietveld 408576698