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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 1180503002: Force a GuestView's embedder to be focused on TouchStart. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Release observer on destruction. Make webview focused (for Windows). Created 5 years, 6 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/apps/guest_view/web_view_browsertest.cc ('k') | content/public/test/browser_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 6fa5c463950681aeb74ad962c8560c3c56257bb5..dee512201fa42dd20f15dd2f97cd8ecf79e9a6ac 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -646,6 +646,11 @@ void RenderWidgetHostViewGuest::OnHandleInputEvent(
}
if (blink::WebInputEvent::isTouchEventType(event->type)) {
+ if (event->type == blink::WebInputEvent::TouchStart &&
+ !embedder->GetView()->HasFocus()) {
+ embedder->GetView()->Focus();
+ }
+
host_->ForwardTouchEventWithLatencyInfo(
*static_cast<const blink::WebTouchEvent*>(event),
ui::LatencyInfo());
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | content/public/test/browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698