summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/blocked_popup_container.cc8
-rw-r--r--chrome/browser/chromeos/main_menu.cc8
-rw-r--r--chrome/browser/chromeos/main_menu.h5
-rw-r--r--chrome/browser/extensions/extension_host.cc5
-rw-r--r--chrome/browser/extensions/extension_host.h5
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc8
-rw-r--r--chrome/browser/renderer_host/render_view_host.h5
-rw-r--r--chrome/browser/renderer_host/render_view_host_delegate.h5
-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
-rw-r--r--chrome/browser/views/notifications/balloon_view_host.cc9
-rw-r--r--chrome/browser/views/notifications/balloon_view_host.h5
-rw-r--r--chrome/common/render_messages_internal.h7
-rw-r--r--chrome/renderer/render_view.cc2
17 files changed, 52 insertions, 67 deletions
diff --git a/chrome/browser/blocked_popup_container.cc b/chrome/browser/blocked_popup_container.cc
index 2422c2b..183a125 100644
--- a/chrome/browser/blocked_popup_container.cc
+++ b/chrome/browser/blocked_popup_container.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+// 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.
@@ -44,7 +44,7 @@ void BlockedPopupContainer::AddTabContents(TabContents* tab_contents,
// Show whitelisted popups immediately.
bool whitelisted = !!whitelist_.count(host);
if (whitelisted)
- owner_->AddNewContents(tab_contents, NEW_POPUP, bounds, true, GURL());
+ owner_->AddNewContents(tab_contents, NEW_POPUP, bounds, true);
if (has_been_dismissed_) {
// Don't want to show any other UI.
@@ -91,7 +91,7 @@ void BlockedPopupContainer::LaunchPopupAtIndex(size_t index) {
BlockedPopups::iterator i(blocked_popups_.begin() + index);
TabContents* tab_contents = i->tab_contents;
tab_contents->set_delegate(NULL);
- owner_->AddNewContents(tab_contents, NEW_POPUP, i->bounds, true, GURL());
+ owner_->AddNewContents(tab_contents, NEW_POPUP, i->bounds, true);
const std::string& host = i->host;
if (!host.empty()) {
@@ -244,7 +244,7 @@ void BlockedPopupContainer::AddNewContents(TabContents* source,
const gfx::Rect& initial_position,
bool user_gesture) {
owner_->AddNewContents(new_contents, disposition, initial_position,
- user_gesture, GURL());
+ user_gesture);
}
void BlockedPopupContainer::CloseContents(TabContents* source) {
diff --git a/chrome/browser/chromeos/main_menu.cc b/chrome/browser/chromeos/main_menu.cc
index 5a8e2e1..b3e1e7f 100644
--- a/chrome/browser/chromeos/main_menu.cc
+++ b/chrome/browser/chromeos/main_menu.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.
@@ -258,13 +258,11 @@ void MainMenu::CreateNewWindow(int route_id) {
void MainMenu::ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url) {
+ bool user_gesture) {
if (disposition == NEW_POPUP) {
pending_contents_->set_delegate(NULL);
browser_->GetSelectedTabContents()->AddNewContents(
- pending_contents_.release(), disposition, initial_pos, user_gesture,
- creator_url);
+ pending_contents_.release(), disposition, initial_pos, user_gesture);
Hide();
}
}
diff --git a/chrome/browser/chromeos/main_menu.h b/chrome/browser/chromeos/main_menu.h
index 10646e9..2099036 100644
--- a/chrome/browser/chromeos/main_menu.h
+++ b/chrome/browser/chromeos/main_menu.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.
@@ -151,8 +151,7 @@ class MainMenu : public RenderViewHostDelegate,
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) {}
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 7d50e4e..78587d3 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-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.
@@ -452,8 +452,7 @@ void ExtensionHost::CreateNewWidget(int route_id, bool activatable) {
void ExtensionHost::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) {
Browser* browser = GetBrowser();
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index e3ae680..75ccc78 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-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.
@@ -126,8 +126,7 @@ class ExtensionHost : public ExtensionPopupHost::PopupDelegate,
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);
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 8c389d4..57464fa 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.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.
@@ -880,12 +880,10 @@ void RenderViewHost::CreateNewWidget(int route_id, bool activatable) {
void RenderViewHost::OnMsgShowView(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url) {
+ bool user_gesture) {
RenderViewHostDelegate::View* view = delegate_->GetViewDelegate();
if (view) {
- view->ShowCreatedWindow(route_id, disposition, initial_pos, user_gesture,
- creator_url);
+ view->ShowCreatedWindow(route_id, disposition, initial_pos, user_gesture);
Send(new ViewMsg_Move_ACK(route_id));
}
}
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index 785a064..5808f26 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.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.
@@ -450,8 +450,7 @@ class RenderViewHost : public RenderWidgetHost,
void OnMsgShowView(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url);
+ bool user_gesture);
void OnMsgShowWidget(int route_id, const gfx::Rect& initial_pos);
void OnMsgRunModal(IPC::Message* reply_msg);
void OnMsgRenderViewReady();
diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h
index e8004bd..335527ac 100644
--- a/chrome/browser/renderer_host/render_view_host_delegate.h
+++ b/chrome/browser/renderer_host/render_view_host_delegate.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.
@@ -97,8 +97,7 @@ class RenderViewHostDelegate {
virtual void ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url) = 0;
+ bool user_gesture) = 0;
// Show the newly created widget with the specified bounds.
// The widget is identified by the route_id passed to CreateNewWidget.
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);
diff --git a/chrome/browser/views/notifications/balloon_view_host.cc b/chrome/browser/views/notifications/balloon_view_host.cc
index c457a1f..3a47499 100644
--- a/chrome/browser/views/notifications/balloon_view_host.cc
+++ b/chrome/browser/views/notifications/balloon_view_host.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.
@@ -73,10 +73,9 @@ void BalloonViewHost::CreateNewWindow(int route_id) {
}
void BalloonViewHost::ShowCreatedWindow(int route_id,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture,
- const GURL& creator_url) {
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture) {
// Don't allow pop-ups from notifications.
if (disposition == NEW_POPUP)
return;
diff --git a/chrome/browser/views/notifications/balloon_view_host.h b/chrome/browser/views/notifications/balloon_view_host.h
index fb9e2e1..4481823 100644
--- a/chrome/browser/views/notifications/balloon_view_host.h
+++ b/chrome/browser/views/notifications/balloon_view_host.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.
@@ -63,8 +63,7 @@ class BalloonViewHost : public views::NativeViewHost,
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) {}
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 384bd38..6359d5b 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.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.
@@ -848,12 +848,11 @@ IPC_BEGIN_MESSAGES(ViewHost)
//
// FUTURE: there will probably be flags here to control if the result is
// in a new window.
- IPC_MESSAGE_ROUTED5(ViewHostMsg_ShowView,
+ IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
int /* route_id */,
WindowOpenDisposition /* disposition */,
gfx::Rect /* initial_pos */,
- bool /* opened_by_user_gesture */,
- GURL /* creator_url */)
+ bool /* opened_by_user_gesture */)
IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
int /* route_id */,
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 5299d1f..ded6217 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -1779,7 +1779,7 @@ void RenderView::show(WebNavigationPolicy policy) {
// browser process will impose a default position otherwise.
Send(new ViewHostMsg_ShowView(opener_id_, routing_id_,
NavigationPolicyToDisposition(policy), initial_pos_,
- opened_by_user_gesture_, creator_url_));
+ opened_by_user_gesture_));
SetPendingWindowRect(initial_pos_);
}