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

Side by Side Diff: content/browser/frame_host/navigation_controller_impl.h

Issue 182713005: Remove frame ID from DidCommitProvisionalLoad. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix John's comments and signin test Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Handles updating the navigation state after the renderer has navigated. 127 // Handles updating the navigation state after the renderer has navigated.
128 // This is used by the WebContentsImpl. 128 // This is used by the WebContentsImpl.
129 // 129 //
130 // If a new entry is created, it will return true and will have filled the 130 // If a new entry is created, it will return true and will have filled the
131 // given details structure and broadcast the NOTIFY_NAV_ENTRY_COMMITTED 131 // given details structure and broadcast the NOTIFY_NAV_ENTRY_COMMITTED
132 // notification. The caller can then use the details without worrying about 132 // notification. The caller can then use the details without worrying about
133 // listening for the notification. 133 // listening for the notification.
134 // 134 //
135 // In the case that nothing has changed, the details structure is undefined 135 // In the case that nothing has changed, the details structure is undefined
136 // and it will return false. 136 // and it will return false.
137 //
138 // TODO(creis): Change RenderViewHost to RenderFrameHost.
139 bool RendererDidNavigate( 137 bool RendererDidNavigate(
140 RenderViewHost* rvh, 138 RenderFrameHost* rfh,
141 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, 139 const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
142 LoadCommittedDetails* details); 140 LoadCommittedDetails* details);
143 141
144 // Notifies us that we just became active. This is used by the WebContentsImpl 142 // Notifies us that we just became active. This is used by the WebContentsImpl
145 // so that we know to load URLs that were pending as "lazy" loads. 143 // so that we know to load URLs that were pending as "lazy" loads.
146 void SetActive(bool is_active); 144 void SetActive(bool is_active);
147 145
148 // Returns true if the given URL would be an in-page navigation (i.e. only 146 // Returns true if the given URL would be an in-page navigation (i.e. only
149 // the reference fragment is different) from the "last committed entry". We do 147 // the reference fragment is different) from the "last committed entry". We do
150 // not compare it against the "active entry" since the active entry can be 148 // not compare it against the "active entry" since the active entry can be
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 226
229 private: 227 private:
230 // |low_water_mark_| is the first time in a sequence of adjusted 228 // |low_water_mark_| is the first time in a sequence of adjusted
231 // times and |high_water_mark_| is the last. 229 // times and |high_water_mark_| is the last.
232 base::Time low_water_mark_; 230 base::Time low_water_mark_;
233 base::Time high_water_mark_; 231 base::Time high_water_mark_;
234 }; 232 };
235 233
236 // Classifies the given renderer navigation (see the NavigationType enum). 234 // Classifies the given renderer navigation (see the NavigationType enum).
237 NavigationType ClassifyNavigation( 235 NavigationType ClassifyNavigation(
238 RenderViewHost* rvh, 236 RenderFrameHost* rfh,
239 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const; 237 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const;
240 238
241 // Causes the controller to load the specified entry. The function assumes 239 // Causes the controller to load the specified entry. The function assumes
242 // ownership of the pointer since it is put in the navigation list. 240 // ownership of the pointer since it is put in the navigation list.
243 // NOTE: Do not pass an entry that the controller already owns! 241 // NOTE: Do not pass an entry that the controller already owns!
244 void LoadEntry(NavigationEntryImpl* entry); 242 void LoadEntry(NavigationEntryImpl* entry);
245 243
246 // Handlers for the different types of navigation types. They will actually 244 // Handlers for the different types of navigation types. They will actually
247 // handle the navigations corresponding to the different NavClasses above. 245 // handle the navigations corresponding to the different NavClasses above.
248 // They will NOT broadcast the commit notification, that should be handled by 246 // They will NOT broadcast the commit notification, that should be handled by
249 // the caller. 247 // the caller.
250 // 248 //
251 // RendererDidNavigateAutoSubframe is special, it may not actually change 249 // RendererDidNavigateAutoSubframe is special, it may not actually change
252 // anything if some random subframe is loaded. It will return true if anything 250 // anything if some random subframe is loaded. It will return true if anything
253 // changed, or false if not. 251 // changed, or false if not.
254 // 252 //
255 // The functions taking |did_replace_entry| will fill into the given variable 253 // The functions taking |did_replace_entry| will fill into the given variable
256 // whether the last entry has been replaced or not. 254 // whether the last entry has been replaced or not.
257 // See LoadCommittedDetails.did_replace_entry. 255 // See LoadCommittedDetails.did_replace_entry.
258 //
259 // TODO(creis): Change RenderViewHost to RenderFrameHost.
260 void RendererDidNavigateToNewPage( 256 void RendererDidNavigateToNewPage(
261 RenderViewHost* rvh, 257 RenderFrameHost* rfh,
262 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, 258 const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
263 bool replace_entry); 259 bool replace_entry);
264 void RendererDidNavigateToExistingPage( 260 void RendererDidNavigateToExistingPage(
265 RenderViewHost* rvh, 261 RenderFrameHost* rfh,
266 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); 262 const FrameHostMsg_DidCommitProvisionalLoad_Params& params);
267 void RendererDidNavigateToSamePage( 263 void RendererDidNavigateToSamePage(
268 RenderViewHost* rvh, 264 RenderFrameHost* rfh,
269 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); 265 const FrameHostMsg_DidCommitProvisionalLoad_Params& params);
270 void RendererDidNavigateInPage( 266 void RendererDidNavigateInPage(
271 RenderViewHost* rvh, 267 RenderFrameHost* rfh,
272 const FrameHostMsg_DidCommitProvisionalLoad_Params& params, 268 const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
273 bool* did_replace_entry); 269 bool* did_replace_entry);
274 void RendererDidNavigateNewSubframe( 270 void RendererDidNavigateNewSubframe(
275 RenderViewHost* rvh, 271 RenderFrameHost* rfh,
276 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); 272 const FrameHostMsg_DidCommitProvisionalLoad_Params& params);
277 bool RendererDidNavigateAutoSubframe( 273 bool RendererDidNavigateAutoSubframe(
278 RenderViewHost* rvh, 274 RenderFrameHost* rfh,
279 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); 275 const FrameHostMsg_DidCommitProvisionalLoad_Params& params);
280 276
281 // Helper function for code shared between Reload() and ReloadIgnoringCache(). 277 // Helper function for code shared between Reload() and ReloadIgnoringCache().
282 void ReloadInternal(bool check_for_repost, ReloadType reload_type); 278 void ReloadInternal(bool check_for_repost, ReloadType reload_type);
283 279
284 // Actually issues the navigation held in pending_entry. 280 // Actually issues the navigation held in pending_entry.
285 void NavigateToPendingEntry(ReloadType reload_type); 281 void NavigateToPendingEntry(ReloadType reload_type);
286 282
287 // Allows the derived class to issue notifications that a load has been 283 // Allows the derived class to issue notifications that a load has been
288 // committed. This will fill in the active entry to the details structure. 284 // committed. This will fill in the active entry to the details structure.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 TimeSmoother time_smoother_; 410 TimeSmoother time_smoother_;
415 411
416 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; 412 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_;
417 413
418 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 414 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
419 }; 415 };
420 416
421 } // namespace content 417 } // namespace content
422 418
423 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 419 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698