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

Unified Diff: content/browser/renderer_host/input/web_input_event_util.h

Issue 178193022: [Android] Always insert a TouchCancel if window or tab focus is lost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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
Index: content/browser/renderer_host/input/web_input_event_util.h
diff --git a/content/browser/renderer_host/input/web_input_event_util.h b/content/browser/renderer_host/input/web_input_event_util.h
index f0680f24b53cc4958571a2e264f6ab2f8191f156..224d93b56cb67943b2a718aa97bbfd44291c4c27 100644
--- a/content/browser/renderer_host/input/web_input_event_util.h
+++ b/content/browser/renderer_host/input/web_input_event_util.h
@@ -6,10 +6,11 @@
#define CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_
#include "content/common/content_export.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/keycodes/keyboard_codes.h"
-namespace blink {
-class WebKeyboardEvent;
+namespace ui {
+class MotionEvent;
}
namespace content {
@@ -20,6 +21,11 @@ CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier(
blink::WebKeyboardEvent* event,
ui::KeyboardCode windows_key_code);
+// Creates a WebTouchEvent from |event|, scaling all size components from
+// |event| by |scale|.
+CONTENT_EXPORT blink::WebTouchEvent
+CreateWebTouchEventFromMotionEvent(const ui::MotionEvent& event, float scale);
+
}
#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_WEB_INPUT_EVENT_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698