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

Unified Diff: chrome/renderer/render_view.cc

Issue 99203: Second attempt at cleaning up handling of --disable-popup-blocking. I didn't... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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/renderer/render_view.h ('k') | chrome/test/automation/automation_proxy_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 14859)
+++ chrome/renderer/render_view.cc (working copy)
@@ -196,7 +196,6 @@
devtools_client_(NULL),
history_back_list_count_(0),
history_forward_list_count_(0),
- disable_popup_blocking_(false),
has_unload_listener_(false),
decrement_shared_popup_at_destruction_(false),
form_field_autofill_request_id_(0),
@@ -328,8 +327,6 @@
if (command_line.HasSwitch(switches::kDomAutomationController))
enabled_bindings_ |= BindingsPolicy::DOM_AUTOMATION;
- disable_popup_blocking_ =
- command_line.HasSwitch(switches::kDisablePopupBlocking);
debug_message_handler_ = new DebugMessageHandler(this);
render_thread_->AddFilter(debug_message_handler_);
@@ -1960,9 +1957,8 @@
// NOTE: initial_pos_ may still have its default values at this point, but
// that's okay. It'll be ignored if disposition is not NEW_POPUP, or the
// browser process will impose a default position otherwise.
- Send(new ViewHostMsg_ShowView(
- opener_id_, routing_id_, disposition, initial_pos_,
- WasOpenedByUserGestureHelper()));
+ Send(new ViewHostMsg_ShowView(opener_id_, routing_id_, disposition,
+ initial_pos_, WasOpenedByUserGesture(NULL)));
}
void RenderView::CloseWidgetSoon(WebWidget* webwidget) {
@@ -2293,17 +2289,6 @@
}
bool RenderView::WasOpenedByUserGesture(WebView* webview) const {
- return WasOpenedByUserGestureHelper();
-}
-
-bool RenderView::WasOpenedByUserGestureHelper() const {
- // If pop-up blocking has been disabled, then treat all new windows as if
- // they were opened by a user gesture. This will prevent them from being
- // blocked. This is a bit of a hack, there should be a more straightforward
- // way to disable pop-up blocking.
- if (disable_popup_blocking_)
- return true;
-
return opened_by_user_gesture_;
}
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/test/automation/automation_proxy_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698