summaryrefslogtreecommitdiffstats
path: root/chrome/browser/navigation_controller.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-19 22:53:30 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-19 22:53:30 +0000
commitec322ff6c39bf30e9b3c1eb878a95507029c6002 (patch)
tree186cb72db581cab4643182d47f040b65b1addb46 /chrome/browser/navigation_controller.cc
parentf3f568b18078fa29f9b84cd66bd2d1029ce408a1 (diff)
downloadchromium_src-ec322ff6c39bf30e9b3c1eb878a95507029c6002.zip
chromium_src-ec322ff6c39bf30e9b3c1eb878a95507029c6002.tar.gz
chromium_src-ec322ff6c39bf30e9b3c1eb878a95507029c6002.tar.bz2
Re-land this change: http://codereview.chromium.org/10967/show
Now with two improvements: - no longer create WebContentsViews as WS_VISIBLE, to prevent them from showing up in the taskbar - make sure overridden CreateView in NativeUIContents and StatusView have the correct signature. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/navigation_controller.cc')
-rw-r--r--chrome/browser/navigation_controller.cc22
1 files changed, 8 insertions, 14 deletions
diff --git a/chrome/browser/navigation_controller.cc b/chrome/browser/navigation_controller.cc
index c646b4a..18e270a 100644
--- a/chrome/browser/navigation_controller.cc
+++ b/chrome/browser/navigation_controller.cc
@@ -184,8 +184,7 @@ NavigationController::NavigationController(TabContents* contents,
NavigationController::NavigationController(
Profile* profile,
const std::vector<TabNavigation>& navigations,
- int selected_navigation,
- HWND parent)
+ int selected_navigation)
: profile_(profile),
pending_entry_(NULL),
last_committed_entry_index_(-1),
@@ -204,7 +203,7 @@ NavigationController::NavigationController(
CreateNavigationEntriesFromTabNavigations(navigations, &entries_);
// And finish the restore.
- FinishRestore(parent, selected_navigation);
+ FinishRestore(selected_navigation);
}
NavigationController::~NavigationController() {
@@ -1024,10 +1023,7 @@ void NavigationController::NavigateToPendingEntry(bool reload) {
if (from_contents && from_contents->type() != pending_entry_->tab_type())
from_contents->set_is_active(false);
- HWND parent =
- from_contents ? GetParent(from_contents->GetContainerHWND()) : 0;
- TabContents* contents =
- GetTabContentsCreateIfNecessary(parent, *pending_entry_);
+ TabContents* contents = GetTabContentsCreateIfNecessary(*pending_entry_);
contents->set_is_active(true);
active_contents_ = contents;
@@ -1059,11 +1055,10 @@ void NavigationController::NotifyNavigationEntryCommitted(
}
TabContents* NavigationController::GetTabContentsCreateIfNecessary(
- HWND parent,
const NavigationEntry& entry) {
TabContents* contents = GetTabContents(entry.tab_type());
if (!contents) {
- contents = TabContents::CreateWithType(entry.tab_type(), parent, profile_,
+ contents = TabContents::CreateWithType(entry.tab_type(), profile_,
entry.site_instance());
if (!contents->AsWebContents()) {
// Update the max page id, otherwise the newly created TabContents may
@@ -1143,7 +1138,7 @@ void NavigationController::NotifyEntryChanged(const NavigationEntry* entry,
Details<EntryChangedDetails>(&det));
}
-NavigationController* NavigationController::Clone(HWND parent_hwnd) {
+NavigationController* NavigationController::Clone() {
NavigationController* nc = new NavigationController(NULL, profile_);
if (GetEntryCount() == 0)
@@ -1157,7 +1152,7 @@ NavigationController* NavigationController::Clone(HWND parent_hwnd) {
new NavigationEntry(*GetEntryAtIndex(i))));
}
- nc->FinishRestore(parent_hwnd, last_committed_entry_index_);
+ nc->FinishRestore(last_committed_entry_index_);
return nc;
}
@@ -1203,7 +1198,7 @@ void NavigationController::CancelTabContentsCollection(TabContentsType t) {
}
}
-void NavigationController::FinishRestore(HWND parent_hwnd, int selected_index) {
+void NavigationController::FinishRestore(int selected_index) {
DCHECK(selected_index >= 0 && selected_index < GetEntryCount());
ConfigureEntriesForRestore(&entries_);
@@ -1212,8 +1207,7 @@ void NavigationController::FinishRestore(HWND parent_hwnd, int selected_index) {
last_committed_entry_index_ = selected_index;
// Callers assume we have an active_contents after restoring, so set it now.
- active_contents_ =
- GetTabContentsCreateIfNecessary(parent_hwnd, *entries_[selected_index]);
+ active_contents_ = GetTabContentsCreateIfNecessary(*entries_[selected_index]);
}
void NavigationController::DiscardNonCommittedEntriesInternal() {