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

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: Fixed compilation 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/web_state/web_state_delegate_stub.mm ('k') | ios/web/web_state/web_state_impl.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 261d87f48a705be879eb4a7e7a5737f2389d6634..7b8e186a0f6bbc0326200e162158dfee3d9b9234 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;
@@ -215,6 +216,8 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
NSString* GetRequestGroupID();
// WebState:
+ WebStateDelegate* GetDelegate() override;
+ void SetDelegate(WebStateDelegate* delegate) override;
UIView* GetView() override;
BrowserState* GetBrowserState() const override;
void OpenURL(const WebState::OpenURLParams& params) override;
@@ -250,6 +253,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;
@@ -278,6 +284,9 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
// Returns true if |web_controller_| has been set.
bool Configured() const;
+ // Delegate, not owned by this object.
+ WebStateDelegate* delegate_;
+
// Stores whether the web state is currently loading a page.
bool is_loading_;
« no previous file with comments | « ios/web/web_state/web_state_delegate_stub.mm ('k') | ios/web/web_state/web_state_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698