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

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

Issue 2773903003: Add way to get native VR UI information from Java (Closed)
Patch Set: Remove comment Created 3 years, 8 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 <string>
10 #include <utility> 11 #include <utility>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/cancelable_callback.h" 14 #include "base/cancelable_callback.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
17 #include "base/single_thread_task_runner.h" 18 #include "base/single_thread_task_runner.h"
19 #include "base/values.h"
18 #include "chrome/browser/android/vr_shell/vr_controller_model.h" 20 #include "chrome/browser/android/vr_shell/vr_controller_model.h"
19 #include "device/vr/android/gvr/gvr_delegate.h" 21 #include "device/vr/android/gvr/gvr_delegate.h"
20 #include "device/vr/vr_service.mojom.h" 22 #include "device/vr/vr_service.mojom.h"
21 #include "mojo/public/cpp/bindings/binding.h" 23 #include "mojo/public/cpp/bindings/binding.h"
22 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr.h" 24 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr.h"
23 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h" 25 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h"
24 #include "ui/gfx/native_widget_types.h" 26 #include "ui/gfx/native_widget_types.h"
25 27
26 namespace base { 28 namespace base {
27 class ListValue; 29 class ListValue;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void UpdateVSyncInterval(int64_t timebase_nanos, double interval_seconds); 106 void UpdateVSyncInterval(int64_t timebase_nanos, double interval_seconds);
105 107
106 void OnRequest(device::mojom::VRVSyncProviderRequest request); 108 void OnRequest(device::mojom::VRVSyncProviderRequest request);
107 void ResetPose(); 109 void ResetPose();
108 void CreateVRDisplayInfo( 110 void CreateVRDisplayInfo(
109 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, 111 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
110 uint32_t device_id); 112 uint32_t device_id);
111 void SubmitWebVRFrame(int16_t frame_index, const gpu::MailboxHolder& mailbox); 113 void SubmitWebVRFrame(int16_t frame_index, const gpu::MailboxHolder& mailbox);
112 void SetSubmitClient( 114 void SetSubmitClient(
113 device::mojom::VRSubmitFrameClientPtrInfo submit_client_info); 115 device::mojom::VRSubmitFrameClientPtrInfo submit_client_info);
116 void CreateUiElementInfos(
117 const std::vector<std::string>& element_names,
118 const base::Callback<void(std::unique_ptr<base::DictionaryValue>)>&
119 on_created);
114 120
115 private: 121 private:
116 void GvrInit(gvr_context* gvr_api); 122 void GvrInit(gvr_context* gvr_api);
117 void InitializeRenderer(); 123 void InitializeRenderer();
118 void DrawFrame(int16_t frame_index); 124 void DrawFrame(int16_t frame_index);
119 void DrawWorldElements(const gvr::Mat4f& head_pose); 125 void DrawWorldElements(const gvr::Mat4f& head_pose);
120 void DrawHeadLockedElements(); 126 void DrawHeadLockedElements();
121 void DrawUiView(const gvr::Mat4f& head_pose, 127 void DrawUiView(const gvr::Mat4f& head_pose,
122 const std::vector<const ContentRectangle*>& elements, 128 const std::vector<const ContentRectangle*>& elements,
123 const gvr::Sizei& render_size, 129 const gvr::Sizei& render_size,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 gvr::Vec3f controller_start_direction_; 248 gvr::Vec3f controller_start_direction_;
243 249
244 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 250 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
245 251
246 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 252 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
247 }; 253 };
248 254
249 } // namespace vr_shell 255 } // namespace vr_shell
250 256
251 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 257 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698