summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_contents.h
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 22:10:17 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 22:10:17 +0000
commitecd9d87092866d04c00b5695ac56f0a026a6a2c8 (patch)
tree8af05cf2b9c524db3d40a7007ed5ec137a820d12 /chrome/browser/web_contents.h
parent7ea9cbb1f61ea1b6990011d076bc09c05b9e72e8 (diff)
downloadchromium_src-ecd9d87092866d04c00b5695ac56f0a026a6a2c8.zip
chromium_src-ecd9d87092866d04c00b5695ac56f0a026a6a2c8.tar.gz
chromium_src-ecd9d87092866d04c00b5695ac56f0a026a6a2c8.tar.bz2
Make a step on refactoring navigation. The eventual plan is to have the NavigationController create and commit the new NavigationEntries (currently WebContents does a bunch of the details of this which is hard to understand and not easily testable).
This tries to consolidate the logic that I want to move to the NavigationController without actually moving it there yet. I removed all of the "PreCommit" functions in WebContents, since when the NavigationController does all of the committing, there won't be a phase where the NavigationEntry exists but isn't committed. Most of the logic could be moved to the PostCommit functions without any problem, which is an indication that the current design was busted anyway. I had to precompute some data and pass it to the *PostCommit function to work around some of the components that required old data. I had to change InfoBars around since it relied on having both the committed and uncommitted entries, but I think the new design is much better anyway. BUG=1343593,1343146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_contents.h')
-rw-r--r--chrome/browser/web_contents.h28
1 files changed, 5 insertions, 23 deletions
diff --git a/chrome/browser/web_contents.h b/chrome/browser/web_contents.h
index 87acbd5..43ba2e8 100644
--- a/chrome/browser/web_contents.h
+++ b/chrome/browser/web_contents.h
@@ -555,34 +555,16 @@ class WebContents : public TabContents,
NavigationEntry* CreateNavigationEntryForCommit(
const ViewHostMsg_FrameNavigate_Params& params);
- // Handles post-navigation tasks specific to some set of frames. DidNavigate()
- // calls these with newly created navigation entry for this navigation BEFORE
- // that entry has been committed to the navigation controller. The functions
- // can update the entry as needed.
- //
- // First the frame-specific version (main or sub) will be called to update the
- // entry as needed after it was created by CreateNavigationEntryForCommit.
- //
- // Then DidNavigateAnyFramePreCommit will be called with the now-complete
- // entry for further processing that is not specific to the type of frame.
- void DidNavigateMainFramePreCommit(
- const ViewHostMsg_FrameNavigate_Params& params,
- NavigationEntry* entry);
- void DidNavigateSubFramePreCommit(
- const ViewHostMsg_FrameNavigate_Params& params,
- NavigationEntry* entry);
- void DidNavigateAnyFramePreCommit(
- const ViewHostMsg_FrameNavigate_Params& params,
- NavigationEntry* entry);
-
// Handles post-navigation tasks in DidNavigate AFTER the entry has been
- // committed to the navigation controller. See WillNavigate* above. Note that
- // the navigation entry is not provided since it may be invalid/changed after
- // being committed.
+ // committed to the navigation controller. Note that the navigation entry is
+ // not provided since it may be invalid/changed after being committed. The
+ // current navigation entry is in the NavigationController at this point.
void DidNavigateMainFramePostCommit(
+ const NavigationController::LoadCommittedDetails& details,
const ViewHostMsg_FrameNavigate_Params& params);
void DidNavigateAnyFramePostCommit(
RenderViewHost* render_view_host,
+ const NavigationController::LoadCommittedDetails& details,
const ViewHostMsg_FrameNavigate_Params& params);
// Called when navigating the main frame to close all child windows if the