Chromium Code Reviews| Index: content/browser/android/vr_content_view_core_impl_delegate.h |
| diff --git a/content/browser/android/vr_content_view_core_impl_delegate.h b/content/browser/android/vr_content_view_core_impl_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fe2351234f965543192ef2485376f9d904ea71ad |
| --- /dev/null |
| +++ b/content/browser/android/vr_content_view_core_impl_delegate.h |
| @@ -0,0 +1,66 @@ |
| +// Copyright 2016 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_ANDROID_VR_CONTENT_VIEW_CORE_IMPL_DELEGATE_H_ |
| +#define CONTENT_BROWSER_ANDROID_VR_CONTENT_VIEW_CORE_IMPL_DELEGATE_H_ |
| + |
| +#include "content/browser/android/content_view_core_impl.h" |
| +#include "content/browser/renderer_host/input/web_input_event_builders_android.h" |
| +#include "content/public/browser/android/vr_content_view_core.h" |
| + |
| +namespace content { |
| + |
| +class RenderFrameHost; |
| +class RenderWidgetHostViewAndroid; |
| + |
| +class VrContentViewCoreImplDelegate : public VrContentViewCore { |
|
bshe
2016/09/21 15:18:41
I am not sure I understand why do you want to add
mthiesse
2016/09/21 17:43:27
Also, we're not implementing a ContentViewCore. Wh
|
| + public: |
| + VrContentViewCoreImplDelegate(ContentViewCore* content_view_core); |
|
bshe
2016/09/21 15:18:41
nit: explicit
asimjour
2016/09/22 14:48:37
Done.
|
| + |
| + static VrContentViewCoreImplDelegate* FromContentViewCore( |
| + ContentViewCore* content_view_core); |
| + |
|
bshe
2016/09/21 15:18:41
add comment
"// VrcontentViewCore overrides:"
asimjour
2016/09/22 14:48:37
Done.
|
| + void SendScrollEvent(long time_ms, |
| + float x, |
| + float y, |
| + float dx, |
| + float dy, |
| + int type) override; |
| + void SendClickEvent(long time_ms, float x, float y) override; |
| + void SendMouseMoveEvent(long time_ms, float x, float y, int type) override; |
| + |
| + void ScrollBegin(long time_ms, |
| + float x, |
| + float y, |
| + float hintx, |
| + float hinty, |
| + bool target_viewport); |
| + void ScrollEnd(long time_ms); |
| + void ScrollBy(long time_ms, float x, float y, float dx, float dy); |
| + void PinchBegin(long time_ms, float x, float y); |
| + void PinchEnd(long time_ms); |
| + void PinchBy(long time_ms, float x, float y, float delta); |
| + void SendPinchEvent(long time_ms, float x, float y, float dz, int type); |
| + ~VrContentViewCoreImplDelegate(); |
| + |
| + private: |
| + void SendGestureEvent(const blink::WebGestureEvent& event); |
| + void SendMouseEvent(const blink::WebMouseEvent& event); |
| + blink::WebGestureEvent MakeGestureEvent(blink::WebInputEvent::Type type, |
| + int64_t time_ms, |
| + float x, |
| + float y) const; |
| + |
| + float dpi_scale() const { return dpi_scale_; } |
| + |
| + // Device scale factor. |
| + float dpi_scale_; |
| + |
| + ContentViewCoreImpl* content_view_core_impl_; |
| + DISALLOW_COPY_AND_ASSIGN(VrContentViewCoreImplDelegate); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_ANDROID_VR_CONTENT_VIEW_CORE_IMPL_DELEGATE_H_ |