diff options
author | mek@chromium.org <mek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-06 23:23:13 +0000 |
---|---|---|
committer | mek@chromium.org <mek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-06 23:23:13 +0000 |
commit | 4e79d09278ad49b6e2db15208e69f287262908c4 (patch) | |
tree | 357d62d6edcd2fc0107abcf61f43cd0235f04a4d /extensions/renderer/messaging_bindings.cc | |
parent | 2236f14280b27fae193e93b7d3014b8372021d8e (diff) | |
download | chromium_src-4e79d09278ad49b6e2db15208e69f287262908c4.zip chromium_src-4e79d09278ad49b6e2db15208e69f287262908c4.tar.gz chromium_src-4e79d09278ad49b6e2db15208e69f287262908c4.tar.bz2 |
Revert of Mark forwarded user gestures as forwarded, and don't forward already forwarded user gestures. (https://codereview.chromium.org/256623008/)
Reason for revert:
The blink-side change for this had the unintended side effect of breaking websites,
so reverting this while we figure out a proper fix.
BUG=369963
Original issue's description:
> Mark forwarded user gestures as forwarded, and don't forward already forwarded user gestures.
>
> BUG=354217
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267057
TBR=kalman@chromium.org
NOTRY=true
BUG=354217
Review URL: https://codereview.chromium.org/261753019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268635 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/renderer/messaging_bindings.cc')
-rw-r--r-- | extensions/renderer/messaging_bindings.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/extensions/renderer/messaging_bindings.cc b/extensions/renderer/messaging_bindings.cc index 281f276..d442681 100644 --- a/extensions/renderer/messaging_bindings.cc +++ b/extensions/renderer/messaging_bindings.cc @@ -29,7 +29,6 @@ #include "third_party/WebKit/public/web/WebScopedUserGesture.h" #include "third_party/WebKit/public/web/WebScopedWindowFocusAllowedIndicator.h" #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" -#include "third_party/WebKit/public/web/WebUserGestureToken.h" #include "v8/include/v8.h" // Message passing API example (in a content script): @@ -105,12 +104,6 @@ class ExtensionImpl : public ObjectBackedNativeHandler { dispatcher_->ClearPortData(port_id); } - bool ShouldForwardUserGesture() { - return blink::WebUserGestureIndicator::isProcessingUserGesture() && - !blink::WebUserGestureIndicator::currentUserGestureToken() - .wasForwarded(); - } - // Sends a message along the given channel. void PostMessage(const v8::FunctionCallbackInfo<v8::Value>& args) { content::RenderView* renderview = context()->GetRenderView(); @@ -128,9 +121,9 @@ class ExtensionImpl : public ObjectBackedNativeHandler { } renderview->Send(new ExtensionHostMsg_PostMessage( - renderview->GetRoutingID(), - port_id, - Message(*v8::String::Utf8Value(args[1]), ShouldForwardUserGesture()))); + renderview->GetRoutingID(), port_id, + Message(*v8::String::Utf8Value(args[1]), + blink::WebUserGestureIndicator::isProcessingUserGesture()))); } // Forcefully disconnects a port. @@ -361,7 +354,6 @@ void MessagingBindings::DeliverMessage( scoped_ptr<blink::WebScopedWindowFocusAllowedIndicator> allow_window_focus; if (message.user_gesture) { web_user_gesture.reset(new blink::WebScopedUserGesture); - blink::WebUserGestureIndicator::currentUserGestureToken().setForwarded(); allow_window_focus.reset(new blink::WebScopedWindowFocusAllowedIndicator); } |