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

Unified Diff: content/browser/android/vr_input_manager_impl.h

Issue 2350253004: Controller support for VrShell (Closed)
Patch Set: removed unused files Created 4 years, 3 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/android/vr_input_manager_impl.h
diff --git a/content/browser/android/vr_input_manager_impl.h b/content/browser/android/vr_input_manager_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..afe19d5d818181a2a41943838088fa77436655f6
--- /dev/null
+++ b/content/browser/android/vr_input_manager_impl.h
@@ -0,0 +1,68 @@
+// 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_input_manager.h"
+
+namespace content {
+
+class RenderFrameHost;
+class RenderWidgetHostViewAndroid;
+
+class VrInputManagerImpl : public VrInputManager {
+ public:
+ explicit VrInputManagerImpl(ContentViewCore* content_view_core);
+
+ static VrInputManagerImpl* FromContentViewCore(
+ ContentViewCore* content_view_core);
+
+ ~VrInputManagerImpl();
+
+ // VrcontentViewCore overrides:
+ 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);
+
+ 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(VrInputManagerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_VR_CONTENT_VIEW_CORE_IMPL_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698