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

Side by Side Diff: content/public/browser/web_contents_observer.h

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased Created 3 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 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Called when a navigation started in the WebContents. |navigation_handle| 133 // Called when a navigation started in the WebContents. |navigation_handle|
134 // is unique to a specific navigation. The same |navigation_handle| will be 134 // is unique to a specific navigation. The same |navigation_handle| will be
135 // provided on subsequent calls to DidRedirectNavigation, DidFinishNavigation, 135 // provided on subsequent calls to DidRedirectNavigation, DidFinishNavigation,
136 // and ReadyToCommitNavigation when related to this navigation. Observers 136 // and ReadyToCommitNavigation when related to this navigation. Observers
137 // should clear any references to |navigation_handle| in DidFinishNavigation, 137 // should clear any references to |navigation_handle| in DidFinishNavigation,
138 // just before it is destroyed. 138 // just before it is destroyed.
139 // 139 //
140 // Note that this is fired by navigations in any frame of the WebContents, 140 // Note that this is fired by navigations in any frame of the WebContents,
141 // not just the main frame. 141 // not just the main frame.
142 // 142 //
143 // Note that this is fired by same-page navigations, such as fragment 143 // Note that this is fired by same-document navigations, such as fragment
144 // navigations or pushState/replaceState, which will not result in a document 144 // navigations or pushState/replaceState, which will not result in a document
145 // change. To filter these out, use NavigationHandle::IsSamePage. 145 // change. To filter these out, use NavigationHandle::IsSameDocument.
146 // 146 //
147 // Note that more than one navigation can be ongoing in the same frame at the 147 // Note that more than one navigation can be ongoing in the same frame at the
148 // same time (including the main frame). Each will get its own 148 // same time (including the main frame). Each will get its own
149 // NavigationHandle. 149 // NavigationHandle.
150 // 150 //
151 // Note that there is no guarantee that DidFinishNavigation will be called 151 // Note that there is no guarantee that DidFinishNavigation will be called
152 // for any particular navigation before DidStartNavigation is called on the 152 // for any particular navigation before DidStartNavigation is called on the
153 // next. 153 // next.
154 virtual void DidStartNavigation(NavigationHandle* navigation_handle) {} 154 virtual void DidStartNavigation(NavigationHandle* navigation_handle) {}
155 155
(...skipping 16 matching lines...) Expand all
172 // navigation has committed, use NavigationHandle::HasCommitted; use 172 // navigation has committed, use NavigationHandle::HasCommitted; use
173 // NavigationHandle::IsErrorPage to know if the navigation resulted in an 173 // NavigationHandle::IsErrorPage to know if the navigation resulted in an
174 // error page. 174 // error page.
175 // 175 //
176 // If this is called because the navigation committed, then the document load 176 // If this is called because the navigation committed, then the document load
177 // will still be ongoing in the RenderFrameHost returned by 177 // will still be ongoing in the RenderFrameHost returned by
178 // |navigation_handle|. Use the document loads events such as DidStopLoading 178 // |navigation_handle|. Use the document loads events such as DidStopLoading
179 // and related methods to listen for continued events from this 179 // and related methods to listen for continued events from this
180 // RenderFrameHost. 180 // RenderFrameHost.
181 // 181 //
182 // Note that this is fired by same-page navigations, such as fragment 182 // Note that this is fired by same-document navigations, such as fragment
183 // navigations or pushState/replaceState, which will not result in a document 183 // navigations or pushState/replaceState, which will not result in a document
184 // change. To filter these out, use NavigationHandle::IsSamePage. 184 // change. To filter these out, use NavigationHandle::IsSameDocument.
185 // 185 //
186 // Note that |navigation_handle| will be destroyed at the end of this call, 186 // Note that |navigation_handle| will be destroyed at the end of this call,
187 // so do not keep a reference to it afterward. 187 // so do not keep a reference to it afterward.
188 virtual void DidFinishNavigation(NavigationHandle* navigation_handle) {} 188 virtual void DidFinishNavigation(NavigationHandle* navigation_handle) {}
189 189
190 // Navigation (obsolete and deprecated) -------------------------------------- 190 // Navigation (obsolete and deprecated) --------------------------------------
191 191
192 // This method is invoked after the browser process starts a navigation to a 192 // This method is invoked after the browser process starts a navigation to a
193 // pending NavigationEntry. It is not called for renderer-initiated 193 // pending NavigationEntry. It is not called for renderer-initiated
194 // navigations unless they are sent to the browser process via OpenURL. It may 194 // navigations unless they are sent to the browser process via OpenURL. It may
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 void ResetWebContents(); 457 void ResetWebContents();
458 458
459 WebContentsImpl* web_contents_; 459 WebContentsImpl* web_contents_;
460 460
461 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 461 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
462 }; 462 };
463 463
464 } // namespace content 464 } // namespace content
465 465
466 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 466 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/public/browser/navigation_handle.h ('k') | content/public/test/test_frame_navigation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698