| Index: content/browser/renderer_host/synthetic_touch_event_android.h
|
| diff --git a/content/browser/renderer_host/synthetic_touch_event_android.h b/content/browser/renderer_host/synthetic_touch_event_android.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4ce8ba7000afbff66a9c0679ed19275a0faf7759
|
| --- /dev/null
|
| +++ b/content/browser/renderer_host/synthetic_touch_event_android.h
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_BROWSER_RENDERER_HOST_SYNTHETIC_TOUCH_EVENT_ANDROID_H_
|
| +#define CONTENT_BROWSER_RENDERER_HOST_SYNTHETIC_TOUCH_EVENT_ANDROID_H_
|
| +
|
| +#include "base/android/jni_android.h"
|
| +#include "base/time/time.h"
|
| +
|
| +namespace WebKit {
|
| +
|
| +class WebTouchEvent;
|
| +
|
| +} // namespace WebKit
|
| +
|
| +namespace content {
|
| +
|
| +class ContentViewCoreImpl;
|
| +
|
| +class SyntheticTouchEventAndroid {
|
| + public:
|
| + // Enum values below need to be kept in sync with SyntheticTouchEvent.java
|
| + enum Action {
|
| + ActionInvalid = -1,
|
| + ActionStart = 0,
|
| + ActionMove = 1,
|
| + ActionCancel = 2,
|
| + ActionEnd = 3
|
| + };
|
| +
|
| + SyntheticTouchEventAndroid(ContentViewCoreImpl* content_view_core);
|
| + ~SyntheticTouchEventAndroid();
|
| +
|
| + void SetPointer(int index, int x, int y, int id);
|
| + void Inject(Action action, int pointer_count);
|
| + void InjectWebTouchEvent(const WebKit::WebTouchEvent* web_touch);
|
| +
|
| + private:
|
| + JNIEnv* env_;
|
| + base::android::ScopedJavaGlobalRef<jobject> java_touch_event_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SyntheticTouchEventAndroid);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_RENDERER_HOST_SYNTHETIC_TOUCH_EVENT_ANDROID_H_
|
|
|