diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-28 22:10:17 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-28 22:10:17 +0000 |
commit | ecd9d87092866d04c00b5695ac56f0a026a6a2c8 (patch) | |
tree | 8af05cf2b9c524db3d40a7007ed5ec137a820d12 /chrome/browser/native_ui_contents.cc | |
parent | 7ea9cbb1f61ea1b6990011d076bc09c05b9e72e8 (diff) | |
download | chromium_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/native_ui_contents.cc')
-rw-r--r-- | chrome/browser/native_ui_contents.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/native_ui_contents.cc b/chrome/browser/native_ui_contents.cc index 2046ba0..73cd614 100644 --- a/chrome/browser/native_ui_contents.cc +++ b/chrome/browser/native_ui_contents.cc @@ -269,7 +269,10 @@ bool NativeUIContents::Navigate(const NavigationEntry& entry, bool reload) { state_->GetByteRepresentation(&content_state); new_entry->set_content_state(content_state); const int32 page_id = new_entry->page_id(); - DidNavigateToEntry(new_entry); + + // The default details is "new navigation", and that's OK with us. + NavigationController::LoadCommittedDetails details; + DidNavigateToEntry(new_entry, &details); // This is not a WebContents, so we use a NULL SiteInstance. controller()->NotifyEntryChangedByPageID(type(), NULL, page_id); return true; |