diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-17 02:49:03 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-17 02:49:03 +0000 |
commit | 9016e4ded1301f0869a2c30779696db56ccea30f (patch) | |
tree | 25550b8b52f4c073c0856b789c7d5fa80c39fdca /chrome/browser/browser.cc | |
parent | 3df7b52a11ed8445b6430df5b202d375931d1767 (diff) | |
download | chromium_src-9016e4ded1301f0869a2c30779696db56ccea30f.zip chromium_src-9016e4ded1301f0869a2c30779696db56ccea30f.tar.gz chromium_src-9016e4ded1301f0869a2c30779696db56ccea30f.tar.bz2 |
Remove HWND from TabContents creation.
R=brettw ReviewURL: http://codereview.chromium.org/10967/show
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5554 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 142ef6f..7c8542c 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1235,9 +1235,7 @@ TabContents* Browser::CreateTabContentsForURL( TabContentsType type = TabContents::TypeForURL(&real_url); DCHECK(type != TAB_CONTENTS_UNKNOWN_TYPE); - HWND parent_hwnd = reinterpret_cast<HWND>(window_->GetNativeHandle()); - TabContents* contents = TabContents::CreateWithType(type, parent_hwnd, - profile, instance); + TabContents* contents = TabContents::CreateWithType(type, profile, instance); contents->SetupController(profile); if (!defer_load) { @@ -1265,9 +1263,7 @@ void Browser::DuplicateContentsAt(int index) { if (type_ == BrowserType::TABBED_BROWSER) { // If this is a tabbed browser, just create a duplicate tab inside the same // window next to the tab being duplicated. - HWND parent_hwnd = reinterpret_cast<HWND>(window_->GetNativeHandle()); - new_contents = contents->controller()->Clone( - parent_hwnd)->active_contents(); + new_contents = contents->controller()->Clone()->active_contents(); // If you duplicate a tab that is not selected, we need to make sure to // select the tab being duplicated so that DetermineInsertionIndex returns // the right index (if tab 5 is selected and we right-click tab 1 we want @@ -1289,9 +1285,8 @@ void Browser::DuplicateContentsAt(int index) { browser->window()->Show(); // The page transition below is only for the purpose of inserting the tab. - HWND parent_hwnd = reinterpret_cast<HWND>(window_->GetNativeHandle()); new_contents = browser->AddTabWithNavigationController( - contents->controller()->Clone(parent_hwnd), + contents->controller()->Clone(), PageTransition::LINK); } @@ -2193,9 +2188,7 @@ NavigationController* Browser::BuildRestoredNavigationController( // Create a NavigationController. This constructor creates the appropriate // set of TabContents. - HWND parent_hwnd = reinterpret_cast<HWND>(window_->GetNativeHandle()); - return new NavigationController( - profile_, navigations, selected_navigation, parent_hwnd); + return new NavigationController(profile_, navigations, selected_navigation); } else { // No navigations. Create a tab with about:blank. TabContents* contents = |