Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2105)

Unified Diff: chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc

Issue 2693573002: Remove unused WebWindowFeatures from popup blocker, reducing WebString use in browser (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698