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

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

Issue 2762003002: Refactor GVR controller gamepad API integration (Closed)
Patch Set: Fix comment, include gvr_types only for data provider Created 3 years, 9 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <utility> 10 #include <utility>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void DrawElements(const gvr::Mat4f& view_proj_matrix, 123 void DrawElements(const gvr::Mat4f& view_proj_matrix,
124 const gvr::Mat4f& view_matrix, 124 const gvr::Mat4f& view_matrix,
125 const std::vector<const ContentRectangle*>& elements); 125 const std::vector<const ContentRectangle*>& elements);
126 std::vector<const ContentRectangle*> GetElementsInDrawOrder( 126 std::vector<const ContentRectangle*> GetElementsInDrawOrder(
127 const gvr::Mat4f& view_matrix, 127 const gvr::Mat4f& view_matrix,
128 const std::vector<const ContentRectangle*>& elements); 128 const std::vector<const ContentRectangle*>& elements);
129 void DrawCursor(const gvr::Mat4f& render_matrix); 129 void DrawCursor(const gvr::Mat4f& render_matrix);
130 void DrawWebVr(); 130 void DrawWebVr();
131 bool WebVrPoseByteIsValid(int pose_index_byte); 131 bool WebVrPoseByteIsValid(int pose_index_byte);
132 132
133 void UpdateController(const gvr::Vec3f& forward_vector); 133 void UpdateController();
134 void HandleControllerInput(const gvr::Vec3f& forward_vector);
134 void SendEventsToTarget(InputTarget input_target, int pixel_x, int pixel_y); 135 void SendEventsToTarget(InputTarget input_target, int pixel_x, int pixel_y);
135 void SendGesture(InputTarget input_target, 136 void SendGesture(InputTarget input_target,
136 std::unique_ptr<blink::WebInputEvent> event); 137 std::unique_ptr<blink::WebInputEvent> event);
137 void CreateUiSurface(); 138 void CreateUiSurface();
138 void OnUIFrameAvailable(); 139 void OnUIFrameAvailable();
139 void OnContentFrameAvailable(); 140 void OnContentFrameAvailable();
140 void OnWebVRFrameAvailable(); 141 void OnWebVRFrameAvailable();
141 bool GetPixelEncodedFrameIndex(uint16_t* frame_index); 142 bool GetPixelEncodedFrameIndex(uint16_t* frame_index);
142 143
143 void OnVSync(); 144 void OnVSync();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 gvr::Vec3f controller_start_direction_; 237 gvr::Vec3f controller_start_direction_;
237 238
238 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 239 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
239 240
240 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 241 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
241 }; 242 };
242 243
243 } // namespace vr_shell 244 } // namespace vr_shell
244 245
245 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 246 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698