summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.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/browser.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/browser.cc')
-rw-r--r--chrome/browser/browser.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 156503f..49333b6 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1234,9 +1234,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) {
@@ -1264,9 +1262,7 @@ void Browser::DuplicateContentsAt(int index) {
if (type_ == TYPE_NORMAL) {
// 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
@@ -1288,9 +1284,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);
}
@@ -2189,9 +2184,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 =