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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 1680143002: Simulate click through gamepad BUTTON_A (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simulate click Created 4 years, 7 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 | « content/browser/android/content_view_core_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 133cf94055843eb8eab707689b33f4fbc55b9a08..688fdd67f04b2473259d6206f0de25f979984e54 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -1058,6 +1058,15 @@ void ContentViewCoreImpl::SendGestureEvent(
rwhv->SendGestureEvent(event);
}
+void ContentViewCoreImpl::SimulateClick(JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
+ RenderFrameHost* focused_frame = web_contents_->GetFocusedFrame();
+ if (!focused_frame)
+ return;
+ focused_frame->Send(
+ new FrameMsg_ClickOnFocusedElement(focused_frame->GetRoutingID()));
+}
+
void ContentViewCoreImpl::ScrollBegin(JNIEnv* env,
const JavaParamRef<jobject>& obj,
jlong time_ms,
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698