diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-28 07:02:04 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-28 07:02:04 +0000 |
commit | ad23a09a27c2863e56810a849beca09cb5e2b6d8 (patch) | |
tree | c9527aeb0e9c0190f621011624ed0f4e7eecf035 /chrome/browser/tabs | |
parent | e18637fbd2e55fb610d92bc061f10a0629826377 (diff) | |
download | chromium_src-ad23a09a27c2863e56810a849beca09cb5e2b6d8.zip chromium_src-ad23a09a27c2863e56810a849beca09cb5e2b6d8.tar.gz chromium_src-ad23a09a27c2863e56810a849beca09cb5e2b6d8.tar.bz2 |
Convert a few methods in NavigationController to return a content::NavigationEntry, in preparation for creating an interface around NavigationController.
BUG=98716
TBR=joi
Review URL: http://codereview.chromium.org/9008034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r-- | chrome/browser/tabs/pinned_tab_codec.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_finder.cc | 4 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.cc | 9 |
3 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/tabs/pinned_tab_codec.cc b/chrome/browser/tabs/pinned_tab_codec.cc index c14caaf..5831504 100644 --- a/chrome/browser/tabs/pinned_tab_codec.cc +++ b/chrome/browser/tabs/pinned_tab_codec.cc @@ -54,7 +54,7 @@ static void EncodePinnedTab(TabStripModel* model, value->SetString(kURL, extension->GetFullLaunchURL().spec()); values->Append(value.release()); } else { - NavigationEntry* entry = +content::NavigationEntry* entry = tab_contents->tab_contents()->GetController().GetActiveEntry(); if (!entry && tab_contents->tab_contents()->GetController().entry_count()) entry = tab_contents->tab_contents()->GetController().GetEntryAtIndex(0); diff --git a/chrome/browser/tabs/tab_finder.cc b/chrome/browser/tabs/tab_finder.cc index c77e184..e5199cd 100644 --- a/chrome/browser/tabs/tab_finder.cc +++ b/chrome/browser/tabs/tab_finder.cc @@ -14,9 +14,9 @@ #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/common/chrome_switches.h" -#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/navigation_details.h" +#include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" @@ -211,7 +211,7 @@ void TabFinder::FetchRedirectStart(WebContents* tab) { if (profile->IsOffTheRecord()) return; - NavigationEntry* committed_entry = + content::NavigationEntry* committed_entry = tab->GetController().GetLastCommittedEntry(); if (!committed_entry || committed_entry->GetURL().is_empty()) return; diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index 7ffd267..f85e616 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -26,9 +26,9 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/navigation_controller.h" -#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_view.h" +#include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/user_metrics.h" @@ -216,13 +216,14 @@ TabContentsWrapper* TabStripModel::DiscardTabContentsAt(int index) { NULL /* base_tab_contents */, NULL /* session_storage_namespace */)); TabContentsWrapper* old_contents = GetContentsAt(index); - NavigationEntry* old_nav_entry = + content::NavigationEntry* old_nav_entry = old_contents->tab_contents()->GetController().GetActiveEntry(); if (old_nav_entry) { // Set the new tab contents to reload this URL when clicked. // This also allows the tab to keep drawing the favicon and page title. - NavigationEntry* new_nav_entry = new NavigationEntry(*old_nav_entry); - std::vector<NavigationEntry*> entries; + content::NavigationEntry* new_nav_entry = + content::NavigationEntry::Create(*old_nav_entry); + std::vector<content::NavigationEntry*> entries; entries.push_back(new_nav_entry); null_contents->tab_contents()->GetController().Restore(0, false, &entries); } |