Commit 3f178c9f authored by Danyao Wang's avatar Danyao Wang Committed by Commit Bot

Add deprecation notes to GlobalWebStateObserver.

Bug: 720786
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I80e08d02f49e452596a21e4a91f0d0d7f3810236
Reviewed-on: https://chromium-review.googlesource.com/758484
Commit-Queue: Danyao Wang <danyao@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515200}
parent 5e030b53
...@@ -21,35 +21,55 @@ class WebState; ...@@ -21,35 +21,55 @@ class WebState;
// WARNING: This class exists only to mimic //chrome-specific flows that // WARNING: This class exists only to mimic //chrome-specific flows that
// listen for notifications from all WebContents or NavigationController // listen for notifications from all WebContents or NavigationController
// instances. Do not add new subclasses of this class for any other reason. // instances. Do not add new subclasses of this class for any other reason.
// DEPRECATED. Use TabHelper to observe WebState creation. Use WebStateObserver
// to observe WebState changes.
// TODO(crbug.com/782269): Remove this class.
class GlobalWebStateObserver { class GlobalWebStateObserver {
public: public:
// DEPRECATED. Use WebStateObserver's |NavigationItemsPruned| instead.
// Called when navigation items have been pruned in |web_state|. // Called when navigation items have been pruned in |web_state|.
// TODO(crbug.com/782269): Remove this method.
virtual void NavigationItemsPruned(WebState* web_state, virtual void NavigationItemsPruned(WebState* web_state,
size_t pruned_item_count) {} size_t pruned_item_count) {}
// Called when a navigation item has changed in |web_state|. // Called when a navigation item has changed in |web_state|.
// DEPRECATED. Use WebStateObserver's |TitleWasSet| to listen for title
// changes and |DidFinishNavigation| for |window.location.replace|.
// TODO(crbug.com/782269): Remove this method.
virtual void NavigationItemChanged(WebState* web_state) {} virtual void NavigationItemChanged(WebState* web_state) {}
// Called when a navigation item has been committed in |web_state|. // Called when a navigation item has been committed in |web_state|.
// DEPRECATED. Use WebStateObserver's |DidFinishNavigation| instead.
// TODO(crbug.com/782269): Remove this method.
virtual void NavigationItemCommitted( virtual void NavigationItemCommitted(
WebState* web_state, WebState* web_state,
const LoadCommittedDetails& load_details) {} const LoadCommittedDetails& load_details) {}
// Called when |web_state| has started loading a page. // Called when |web_state| has started loading a page.
// DEPRECATED. Use WebStateObserver's |DidStartLoading| instead.
// TODO(crbug.com/782269): Remove this method.
virtual void WebStateDidStartLoading(WebState* web_state) {} virtual void WebStateDidStartLoading(WebState* web_state) {}
// Called when |web_state| has stopped loading a page. // Called when |web_state| has stopped loading a page.
// DEPRECATED. Use WebStateObserver's |DidStopLoading| instead.
// TODO(crbug.com/782269): Remove this method.
virtual void WebStateDidStopLoading(WebState* web_state) {} virtual void WebStateDidStopLoading(WebState* web_state) {}
// Called when the current page is loaded in |web_state|. // Called when the current page is loaded in |web_state|.
// DEPRECATED. Use WebStateObserver's |PageLoaded| instead.
// TODO(crbug.com/782269): Remove this method.
virtual void PageLoaded(WebState* web_state, virtual void PageLoaded(WebState* web_state,
PageLoadCompletionStatus load_completion_status) {} PageLoadCompletionStatus load_completion_status) {}
// Called when the web process is terminated (usually by crashing, though // Called when the web process is terminated (usually by crashing, though
// possibly by other means). // possibly by other means).
// DEPRECATED. Use WebStateObserver's |RendererProcessGone| instead.
// TODO(crbug.com/782269): Remove this method.
virtual void RenderProcessGone(WebState* web_state) {} virtual void RenderProcessGone(WebState* web_state) {}
// Called when |web_state| is being destroyed. // Called when |web_state| is being destroyed.
// DEPRECATED. Use WebStateObserver's |WebStateDestroyed| instead.
// TODO(crbug.com/782269): Remove this method.
virtual void WebStateDestroyed(WebState* web_state) {} virtual void WebStateDestroyed(WebState* web_state) {}
protected: protected:
......
...@@ -71,7 +71,7 @@ class WebStateObserver { ...@@ -71,7 +71,7 @@ class WebStateObserver {
// change. To filter these out, use NavigationContext::IsSameDocument(). // change. To filter these out, use NavigationContext::IsSameDocument().
// //
// More than one navigation can be ongoing in the same frame at the same // More than one navigation can be ongoing in the same frame at the same
// time. Each will get its own NavigationHandle. // time. Each will get its own NavigationContext.
// //
// There is no guarantee that DidFinishNavigation() will be called for any // There is no guarantee that DidFinishNavigation() will be called for any
// particular navigation before DidStartNavigation is called on the next. // particular navigation before DidStartNavigation is called on the next.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment