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

Side by Side Diff: chrome/browser/android/vr_shell/vr_controller_manager.h

Issue 2350253004: Controller support for VrShell (Closed)
Patch Set: Controller support for VrShell 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MANAGER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MANAGER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/task_runner_util.h"
10 #include "chrome/browser/android/vr_shell/vr_controller.h"
11 #include "chrome/browser/android/vr_shell/vr_gesture.h"
12 #include "chrome/browser/android/vr_shell/vr_input_manager.h"
13 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr.h"
14 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_controller.h"
15 #include "third_party/gvr-android-sdk/src/ndk-beta/include/vr/gvr/capi/include/g vr_types.h"
16
17 namespace vr_shell {
18
19 class VrControllerManager
20 : public base::RefCountedThreadSafe<VrControllerManager> {
21 public:
22 // Controller API entry point.
23 VrControllerManager();
24
25 // Must be called when the GL renderer gets onSurfaceCreated().
26 std::unique_ptr<VrController> InitializeController(gvr_context_* gvr_context);
27
28 // Must be called when the GL renderer gets onDrawFrame().
29 VrGesture Update();
30
31 // Must be called when the GL renderer gets onDrawFrame().
32 void ProcessUpdatedGesture(VrGesture gesture);
mthiesse 2016/09/29 14:46:59 ProcessUpdatedContentGesture?
asimjour 2016/09/30 13:37:43 Done.
33
34 // Must be called when the GL renderer gets onDrawFrame().
35 void ProcessUpdatedUIGesture(VrGesture gesture);
36
37 void SetWebContents(content::WebContents* content_wc_ptr,
38 content::WebContents* ui_wc_ptr);
39
40 protected:
41 friend class base::RefCountedThreadSafe<VrControllerManager>;
42 virtual ~VrControllerManager();
43
44 private:
45 void SendGesture(VrGesture gesture, VrInputManager* vr_input_manager);
46
47 VrInputManager* vr_content_ptr_;
48 VrInputManager* vr_ui_ptr_;
49 std::unique_ptr<gvr::ControllerApi> controller_api_;
50
51 DISALLOW_COPY_AND_ASSIGN(VrControllerManager);
52 };
53
54 } // namespace vr_shell
55
56 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698