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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // with another one, possibly changing processes. The RenderViewHost that has 114 // with another one, possibly changing processes. The RenderViewHost that has
115 // been replaced is in |old_host|, which is nullptr if the old RVH was shut 115 // been replaced is in |old_host|, which is nullptr if the old RVH was shut
116 // down. 116 // down.
117 virtual void RenderViewHostChanged(RenderViewHost* old_host, 117 virtual void RenderViewHostChanged(RenderViewHost* old_host,
118 RenderViewHost* new_host) {} 118 RenderViewHost* new_host) {}
119 119
120 // Navigation related events ------------------------------------------------ 120 // Navigation related events ------------------------------------------------
121 121
122 // Called when a navigation started in the WebContents. |navigation_handle| 122 // Called when a navigation started in the WebContents. |navigation_handle|
123 // is unique to a specific navigation. The same |navigation_handle| will be 123 // is unique to a specific navigation. The same |navigation_handle| will be
124 // provided on subsequent calls to DidRedirect/Commit/FinishNavigation 124 // provided on subsequent calls to
125 // related to this navigation. 125 // DidRedirect/Commit/FinishNavigation/ReadyToCommitNavigation related to
126 // this navigation.
126 // 127 //
127 // Note that this is fired by navigations in any frame of the WebContents, 128 // Note that this is fired by navigations in any frame of the WebContents,
128 // not just the main frame. 129 // not just the main frame.
129 // 130 //
130 // Note that more than one navigation can be ongoing in the same frame at the 131 // Note that more than one navigation can be ongoing in the same frame at the
131 // same time (including the main frame). Each will get its own 132 // same time (including the main frame). Each will get its own
132 // NavigationHandle. 133 // NavigationHandle.
133 // 134 //
134 // Note that there is no guarantee that DidFinishNavigation will be called 135 // Note that there is no guarantee that DidFinishNavigation will be called
135 // for any particular navigation before DidStartNavigation is called on the 136 // for any particular navigation before DidStartNavigation is called on the
136 // next. 137 // next.
137 virtual void DidStartNavigation(NavigationHandle* navigation_handle) {} 138 virtual void DidStartNavigation(NavigationHandle* navigation_handle) {}
138 139
139 // Called when a navigation encountered a server redirect. 140 // Called when a navigation encountered a server redirect.
140 virtual void DidRedirectNavigation(NavigationHandle* navigation_handle) {} 141 virtual void DidRedirectNavigation(NavigationHandle* navigation_handle) {}
141 142
143 // PlzNavigate
144 // Called when the navigation is ready to be committed in a renderer. This is
145 // the first point in time where a RenderFrameHost is associated with the
146 // navigation. Observers that want to initialize any renderer side
147 // structures/state before the RenderFrame is navigated, should use this
148 // method as opposed to DidCommitNavigation, which is after the fact.
149 virtual void ReadyToCommitNavigation(NavigationHandle* navigation_handle) {}
150
142 // Called when a navigation was committed. 151 // Called when a navigation was committed.
143 virtual void DidCommitNavigation(NavigationHandle* navigation_handle) {} 152 virtual void DidCommitNavigation(NavigationHandle* navigation_handle) {}
144 153
145 // Called when a navigation stopped in the WebContents. This happens when a 154 // Called when a navigation stopped in the WebContents. This happens when a
146 // navigation is either aborted, replaced by a new one, or the document load 155 // navigation is either aborted, replaced by a new one, or the document load
147 // finishes. Note that |navigation_handle| will be destroyed at the end of 156 // finishes. Note that |navigation_handle| will be destroyed at the end of
148 // this call, so do not keep a reference to it afterward. 157 // this call, so do not keep a reference to it afterward.
149 virtual void DidFinishNavigation(NavigationHandle* navigation_handle) {} 158 virtual void DidFinishNavigation(NavigationHandle* navigation_handle) {}
150 159
151 // --------------------------------------------------------------------------- 160 // ---------------------------------------------------------------------------
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 void ResetWebContents(); 453 void ResetWebContents();
445 454
446 WebContentsImpl* web_contents_; 455 WebContentsImpl* web_contents_;
447 456
448 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 457 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
449 }; 458 };
450 459
451 } // namespace content 460 } // namespace content
452 461
453 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 462 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« 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