summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/interstitial_page.cc7
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc20
-rw-r--r--chrome/browser/tab_contents/tab_contents.h8
-rw-r--r--chrome/browser/tab_contents/tab_contents_view.cc7
-rw-r--r--chrome/browser/tab_contents/tab_contents_view.h5
5 files changed, 22 insertions, 25 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc
index 34e008c..46edb38 100644
--- a/chrome/browser/tab_contents/interstitial_page.cc
+++ b/chrome/browser/tab_contents/interstitial_page.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -87,8 +87,7 @@ class InterstitialPage::InterstitialPageRVHViewDelegate
virtual void ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url);
+ bool user_gesture);
virtual void ShowCreatedWidget(int route_id,
const gfx::Rect& initial_pos);
virtual void ShowContextMenu(const ContextMenuParams& params);
@@ -542,7 +541,7 @@ void InterstitialPage::InterstitialPageRVHViewDelegate::CreateNewWidget(
void InterstitialPage::InterstitialPageRVHViewDelegate::ShowCreatedWindow(
int route_id, WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos, bool user_gesture, const GURL& creator_url) {
+ const gfx::Rect& initial_pos, bool user_gesture) {
NOTREACHED() << "InterstitialPage does not support showing popups yet.";
}
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 5be4573..6aa03dd 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -832,8 +832,7 @@ ConstrainedWindow* TabContents::CreateConstrainedDialog(
void TabContents::AddNewContents(TabContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url) {
+ bool user_gesture) {
if (!delegate_)
return;
@@ -842,9 +841,8 @@ void TabContents::AddNewContents(TabContents* new_contents,
switches::kDisablePopupBlocking)) {
// Unrequested popups from normal pages are constrained unless they're in
// the whitelist. The popup owner will handle checking this.
- delegate_->GetConstrainingContents(this)->AddPopup(new_contents,
- initial_pos,
- creator_url.is_valid() ? creator_url.host() : std::string());
+ delegate_->GetConstrainingContents(this)->AddPopup(
+ new_contents, initial_pos);
} else {
#if defined(OS_CHROMEOS)
if (disposition == NEW_POPUP) {
@@ -1264,10 +1262,14 @@ void TabContents::CreateBlockedPopupContainerIfNecessary() {
}
void TabContents::AddPopup(TabContents* new_contents,
- const gfx::Rect& initial_pos,
- const std::string& host) {
+ const gfx::Rect& initial_pos) {
CreateBlockedPopupContainerIfNecessary();
- blocked_popups_->AddTabContents(new_contents, initial_pos, host);
+ // A popup is associated with the toplevel site instead of a potential frame
+ // that spawns it.
+ const GURL& url = GetURL();
+ blocked_popups_->AddTabContents(
+ new_contents, initial_pos,
+ url.is_valid() ? url.host() : std::string());
}
// TODO(brettw) This should be on the TabContentsView.
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index 05f0566..7dd2514 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -354,8 +354,7 @@ class TabContents : public PageNavigator,
void AddNewContents(TabContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url);
+ bool user_gesture);
// Closes all constrained windows that represent web popups that have not yet
// been activated by the user and are as such auto-positioned in the bottom
@@ -691,8 +690,7 @@ class TabContents : public PageNavigator,
// Adds the incoming |new_contents| to the |blocked_popups_| container.
void AddPopup(TabContents* new_contents,
- const gfx::Rect& initial_pos,
- const std::string& host);
+ const gfx::Rect& initial_pos);
// Called by a derived class when the TabContents is resized, causing
// suppressed constrained web popups to be repositioned to the new bounds
diff --git a/chrome/browser/tab_contents/tab_contents_view.cc b/chrome/browser/tab_contents/tab_contents_view.cc
index 9505069..979886b 100644
--- a/chrome/browser/tab_contents/tab_contents_view.cc
+++ b/chrome/browser/tab_contents/tab_contents_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -42,12 +42,11 @@ void TabContentsView::CreateNewWidget(int route_id, bool activatable) {
void TabContentsView::ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url) {
+ bool user_gesture) {
TabContents* contents = delegate_view_helper_.GetCreatedWindow(route_id);
if (contents) {
tab_contents()->AddNewContents(contents, disposition, initial_pos,
- user_gesture, creator_url);
+ user_gesture);
}
}
diff --git a/chrome/browser/tab_contents/tab_contents_view.h b/chrome/browser/tab_contents/tab_contents_view.h
index 79bee6d..3b0db8f 100644
--- a/chrome/browser/tab_contents/tab_contents_view.h
+++ b/chrome/browser/tab_contents/tab_contents_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -175,8 +175,7 @@ class TabContentsView : public RenderViewHostDelegate::View {
virtual void ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url);
+ bool user_gesture);
virtual void ShowCreatedWidget(int route_id, const gfx::Rect& initial_pos);
virtual bool IsReservedAccelerator(const NativeWebKeyboardEvent& event);