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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10873090: Consume user gestures when navigating in a new tab/window. This ensures that a site can not create … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
===================================================================
--- content/renderer/render_view_impl.cc (revision 153306)
+++ content/renderer/render_view_impl.cc (working copy)
@@ -1627,6 +1627,9 @@
const GURL& url,
const Referrer& referrer,
WebNavigationPolicy policy) {
+ if (frame->isProcessingUserGesture())
+ frame->consumeUserGesture();
abarth-chromium 2012/08/27 19:46:05 Can we just call this unconditionally?
+
Send(new ViewHostMsg_OpenURL(
routing_id_,
url,
@@ -1718,6 +1721,10 @@
int32 surface_id = 0;
int64 cloned_session_storage_namespace_id;
+ // Consume a user gesture if we have one.
+ if (creator->isProcessingUserGesture())
+ creator->consumeUserGesture();
abarth-chromium 2012/08/27 19:46:05 We need to do this both for OpenURL and createView
+
RenderThread::Get()->Send(
new ViewHostMsg_CreateWindow(params,
&routing_id,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698