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

Unified Diff: content/public/browser/web_contents_observer.h

Issue 1340163002: PlzNavigate: fix timing issue in app window creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-throttle
Patch Set: Addressed nits Created 5 years, 3 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: content/public/browser/web_contents_observer.h
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index d310cb229e485af2d66577fff629b5c71e791334..6a2b1acdd7976fa13a5855cae2faa574cabb1530 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -121,8 +121,9 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
// Called when a navigation started in the WebContents. |navigation_handle|
// is unique to a specific navigation. The same |navigation_handle| will be
- // provided on subsequent calls to DidRedirect/Commit/FinishNavigation
- // related to this navigation.
+ // provided on subsequent calls to
+ // DidRedirect/Commit/FinishNavigation/ReadyToCommitNavigation related to
+ // this navigation.
//
// Note that this is fired by navigations in any frame of the WebContents,
// not just the main frame.
@@ -139,6 +140,14 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
// Called when a navigation encountered a server redirect.
virtual void DidRedirectNavigation(NavigationHandle* navigation_handle) {}
+ // PlzNavigate
+ // Called when the navigation is ready to be committed in a renderer. This is
+ // the first point in time where a RenderFrameHost is associated with the
+ // navigation. Observers that want to initialize any renderer side
+ // structures/state before the RenderFrame is navigated, should use this
+ // method as opposed to DidCommitNavigation, which is after the fact.
+ virtual void ReadyToCommitNavigation(NavigationHandle* navigation_handle) {}
+
// Called when a navigation was committed.
virtual void DidCommitNavigation(NavigationHandle* navigation_handle) {}
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/test/web_contents_observer_sanity_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698