summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-14 15:42:43 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-14 15:42:43 +0000
commite9ba44740c88677d8b566583f7041d1dd33b6a9d (patch)
tree0d85125a089ba6c36136a22651d196a9ba86ec8f /chrome/browser/tabs
parentb5ef2ca48635ddf96698a11676a4625aff6ef734 (diff)
downloadchromium_src-e9ba44740c88677d8b566583f7041d1dd33b6a9d.zip
chromium_src-e9ba44740c88677d8b566583f7041d1dd33b6a9d.tar.gz
chromium_src-e9ba44740c88677d8b566583f7041d1dd33b6a9d.tar.bz2
This is almost a complete rewrite of DidNavigate and the associated NavigationController logic. The approach is that the NavigationController should be responsible for the logic and memory management of navigation. Previously, half the logic and memory management lived in WebContents which made it very hard to figure out what was going on.
I split out the various navigation types into separate functions, which then copy and update any existing NavigationEntry as necessary. Previously, WebContents would make a new one which would be manually populated with random fields (I think some were forgotten, too), and then the NavigationController may or may not commit it. Review URL: http://codereview.chromium.org/479 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2201 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc17
1 files changed, 0 insertions, 17 deletions
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 492d9c8..98552cf 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -31,25 +31,8 @@ class TabStripModelTestTabContents : public TabContents {
TabStripModelTestTabContents(const TabContentsType type)
: TabContents(type) {
}
-
- bool Navigate(const NavigationEntry& entry, bool reload) {
- NavigationEntry* pending_entry = new NavigationEntry(entry);
- if (pending_entry->page_id() == -1) {
- pending_entry->set_page_id(g_page_id_++);
- }
- NavigationController::LoadCommittedDetails details;
- DidNavigateToEntry(pending_entry, &details);
-
- return true;
- }
-
- private:
- // We need to use valid, incrementing page ids otherwise the TabContents
- // and NavController will not play nice when we try to go back and forward.
- static int g_page_id_;
};
-int TabStripModelTestTabContents::g_page_id_ = 0;
// This constructs our fake TabContents.
class TabStripModelTestTabContentsFactory : public TabContentsFactory {