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

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

Issue 2742083002: Revert of Re-land WebVR compositor bypass via BrowserMain context + mailbox (Closed)
Patch Set: 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_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 namespace blink { 27 namespace blink {
28 class WebInputEvent; 28 class WebInputEvent;
29 } 29 }
30 30
31 namespace content { 31 namespace content {
32 class WebContents; 32 class WebContents;
33 } 33 }
34 34
35 namespace gpu {
36 struct MailboxHolder;
37 }
38
39 namespace ui { 35 namespace ui {
40 class WindowAndroid; 36 class WindowAndroid;
41 } 37 }
42 38
43 namespace vr_shell { 39 namespace vr_shell {
44 40
45 class AndroidUiGestureTarget; 41 class AndroidUiGestureTarget;
46 class UiInterface; 42 class UiInterface;
47 class VrCompositor; 43 class VrCompositor;
48 class VrGLThread; 44 class VrGLThread;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 164
169 void ContentFrameWasResized(bool width_changed); 165 void ContentFrameWasResized(bool width_changed);
170 166
171 void ForceExitVr(); 167 void ForceExitVr();
172 168
173 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event); 169 void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event);
174 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event); 170 void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event);
175 171
176 // TODO(mthiesse): Find a better place for these functions to live. 172 // TODO(mthiesse): Find a better place for these functions to live.
177 static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat); 173 static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat);
178 static gvr::Sizei GetRecommendedWebVrSize(gvr::GvrApi* gvr_api);
179 static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo( 174 static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo(
180 gvr::GvrApi* gvr_api, 175 gvr::GvrApi* gvr_api,
181 gvr::Sizei recommended_size, 176 gvr::Sizei compositor_size,
182 uint32_t device_id); 177 uint32_t device_id);
183 178
184 private: 179 private:
185 ~VrShell() override; 180 ~VrShell() override;
186 void PostToGlThreadWhenReady(const base::Closure& task); 181 void PostToGlThreadWhenReady(const base::Closure& task);
187 void SetContentPaused(bool paused); 182 void SetContentPaused(bool paused);
188 void SetUiState(); 183 void SetUiState();
189 184
190 // content::WebContentsObserver implementation. 185 // content::WebContentsObserver implementation.
191 void RenderViewHostChanged(content::RenderViewHost* old_host, 186 void RenderViewHostChanged(content::RenderViewHost* old_host,
192 content::RenderViewHost* new_host) override; 187 content::RenderViewHost* new_host) override;
193 void MainFrameWasResized(bool width_changed) override; 188 void MainFrameWasResized(bool width_changed) override;
194 void WebContentsDestroyed() override; 189 void WebContentsDestroyed() override;
195 190
196 // device::GvrDelegate implementation 191 // device::GvrDelegate implementation
197 void SetWebVRSecureOrigin(bool secure_origin) override; 192 void SetWebVRSecureOrigin(bool secure_origin) override;
198 void SubmitWebVRFrame(int16_t frame_index, 193 void SubmitWebVRFrame() override;
199 const gpu::MailboxHolder& mailbox) override;
200 void UpdateWebVRTextureBounds(int16_t frame_index, 194 void UpdateWebVRTextureBounds(int16_t frame_index,
201 const gvr::Rectf& left_bounds, 195 const gvr::Rectf& left_bounds,
202 const gvr::Rectf& right_bounds, 196 const gvr::Rectf& right_bounds) override;
203 const gvr::Sizei& source_size) override;
204 void OnVRVsyncProviderRequest( 197 void OnVRVsyncProviderRequest(
205 device::mojom::VRVSyncProviderRequest request) override; 198 device::mojom::VRVSyncProviderRequest request) override;
206 void UpdateVSyncInterval(int64_t timebase_nanos, 199 void UpdateVSyncInterval(int64_t timebase_nanos,
207 double interval_seconds) override; 200 double interval_seconds) override;
208 bool SupportsPresentation() override; 201 bool SupportsPresentation() override;
209 void ResetPose() override; 202 void ResetPose() override;
210 void CreateVRDisplayInfo( 203 void CreateVRDisplayInfo(
211 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, 204 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
212 uint32_t device_id) override; 205 uint32_t device_id) override;
213 206
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 242 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
250 243
251 DISALLOW_COPY_AND_ASSIGN(VrShell); 244 DISALLOW_COPY_AND_ASSIGN(VrShell);
252 }; 245 };
253 246
254 bool RegisterVrShell(JNIEnv* env); 247 bool RegisterVrShell(JNIEnv* env);
255 248
256 } // namespace vr_shell 249 } // namespace vr_shell
257 250
258 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 251 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/non_presenting_gvr_delegate.cc ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698