| Index: chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
|
| diff --git a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
|
| index 35f36bf73d9c03ee7d7760d214bdae082ddddbbb..a03bd3dd35ef12c1eebef8837b8a61ca8c4d88d7 100644
|
| --- a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
|
| +++ b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
|
| @@ -18,25 +18,20 @@
|
| #include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| -#include "third_party/WebKit/public/web/WebWindowFeatures.h"
|
|
|
| #if defined(OS_ANDROID)
|
| #include "chrome/browser/ui/android/tab_model/tab_model_list.h"
|
| #endif
|
|
|
| -using blink::WebWindowFeatures;
|
| -
|
| const size_t kMaximumNumberOfPopups = 25;
|
|
|
| DEFINE_WEB_CONTENTS_USER_DATA_KEY(PopupBlockerTabHelper);
|
|
|
| struct PopupBlockerTabHelper::BlockedRequest {
|
| - BlockedRequest(const chrome::NavigateParams& params,
|
| - const WebWindowFeatures& window_features)
|
| - : params(params), window_features(window_features) {}
|
| + explicit BlockedRequest(const chrome::NavigateParams& params)
|
| + : params(params) {}
|
|
|
| chrome::NavigateParams params;
|
| - WebWindowFeatures window_features;
|
| };
|
|
|
| PopupBlockerTabHelper::PopupBlockerTabHelper(
|
| @@ -74,8 +69,7 @@ void PopupBlockerTabHelper::PopupNotificationVisibilityChanged(
|
| }
|
|
|
| bool PopupBlockerTabHelper::MaybeBlockPopup(
|
| - const chrome::NavigateParams& params,
|
| - const WebWindowFeatures& window_features) {
|
| + const chrome::NavigateParams& params) {
|
| // A page can't spawn popups (or do anything else, either) until its load
|
| // commits, so when we reach here, the popup was spawned by the
|
| // NavigationController's last committed entry, not the active entry. For
|
| @@ -96,23 +90,20 @@ bool PopupBlockerTabHelper::MaybeBlockPopup(
|
| return false;
|
| }
|
|
|
| - AddBlockedPopup(params, window_features);
|
| + AddBlockedPopup(params);
|
| return true;
|
| }
|
|
|
| void PopupBlockerTabHelper::AddBlockedPopup(const BlockedWindowParams& params) {
|
| - AddBlockedPopup(params.CreateNavigateParams(web_contents()),
|
| - params.features());
|
| + AddBlockedPopup(params.CreateNavigateParams(web_contents()));
|
| }
|
|
|
| void PopupBlockerTabHelper::AddBlockedPopup(
|
| - const chrome::NavigateParams& params,
|
| - const WebWindowFeatures& window_features) {
|
| + const chrome::NavigateParams& params) {
|
| if (blocked_popups_.size() >= kMaximumNumberOfPopups)
|
| return;
|
|
|
| - blocked_popups_.Add(
|
| - base::MakeUnique<BlockedRequest>(params, window_features));
|
| + blocked_popups_.Add(base::MakeUnique<BlockedRequest>(params));
|
| TabSpecificContentSettings::FromWebContents(web_contents())->
|
| OnContentBlocked(CONTENT_SETTINGS_TYPE_POPUPS);
|
| }
|
| @@ -130,8 +121,7 @@ void PopupBlockerTabHelper::ShowBlockedPopup(int32_t id) {
|
| #endif
|
| if (popup->params.target_contents) {
|
| popup->params.target_contents->Send(new ChromeViewMsg_SetWindowFeatures(
|
| - popup->params.target_contents->GetRenderViewHost()->GetRoutingID(),
|
| - popup->window_features));
|
| + popup->params.target_contents->GetRenderViewHost()->GetRoutingID()));
|
| }
|
| blocked_popups_.Remove(id);
|
| if (blocked_popups_.IsEmpty())
|
|
|