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

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

Issue 2612333002: Allow VRDisplay to specify which frame the layer bounds should be updated at. (Closed)
Patch Set: Finish implementaion Created 3 years, 11 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Perform a UI action triggered by the javascript API. 114 // Perform a UI action triggered by the javascript API.
115 void DoUiAction(const UiAction action); 115 void DoUiAction(const UiAction action);
116 116
117 void SetContentCssSize(float width, float height, float dpr); 117 void SetContentCssSize(float width, float height, float dpr);
118 void SetUiCssSize(float width, float height, float dpr); 118 void SetUiCssSize(float width, float height, float dpr);
119 119
120 void ContentFrameWasResized(bool width_changed); 120 void ContentFrameWasResized(bool width_changed);
121 121
122 void ForceExitVr(); 122 void ForceExitVr();
123 123
124 static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat, 124 static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat);
125 uint32_t pose_index);
126 125
127 private: 126 private:
128 virtual ~VrShell(); 127 virtual ~VrShell();
129 void SetShowingOverscrollGlow(bool showing_glow); 128 void SetShowingOverscrollGlow(bool showing_glow);
130 void PostToGlThreadWhenReady(const base::Closure& task); 129 void PostToGlThreadWhenReady(const base::Closure& task);
131 130
132 // content::WebContentsObserver implementation. 131 // content::WebContentsObserver implementation.
133 void RenderViewHostChanged(content::RenderViewHost* old_host, 132 void RenderViewHostChanged(content::RenderViewHost* old_host,
134 content::RenderViewHost* new_host) override; 133 content::RenderViewHost* new_host) override;
135 void MainFrameWasResized(bool width_changed) override; 134 void MainFrameWasResized(bool width_changed) override;
136 void WebContentsDestroyed() override; 135 void WebContentsDestroyed() override;
137 136
138 // device::GvrDelegate implementation 137 // device::GvrDelegate implementation
139 void SetWebVRSecureOrigin(bool secure_origin) override; 138 void SetWebVRSecureOrigin(bool secure_origin) override;
140 void SubmitWebVRFrame() override; 139 void SubmitWebVRFrame() override;
141 void UpdateWebVRTextureBounds(const gvr::Rectf& left_bounds, 140 void UpdateWebVRTextureBounds(int16_t frame_index,
141 const gvr::Rectf& left_bounds,
142 const gvr::Rectf& right_bounds) override; 142 const gvr::Rectf& right_bounds) override;
143 gvr::GvrApi* gvr_api() override; 143 gvr::GvrApi* gvr_api() override;
144 void SetWebVRRenderSurfaceSize(int width, int height) override; 144 void SetWebVRRenderSurfaceSize(int width, int height) override;
145 gvr::Sizei GetWebVRCompositorSurfaceSize() override; 145 gvr::Sizei GetWebVRCompositorSurfaceSize() override;
146 void OnVRVsyncProviderRequest( 146 void OnVRVsyncProviderRequest(
147 device::mojom::VRVSyncProviderRequest request) override; 147 device::mojom::VRVSyncProviderRequest request) override;
148 void UpdateVSyncInterval(long timebase_nanos, 148 void UpdateVSyncInterval(long timebase_nanos,
149 double interval_seconds) override; 149 double interval_seconds) override;
150 150
151 std::unique_ptr<UiInterface> html_interface_; 151 std::unique_ptr<UiInterface> html_interface_;
(...skipping 19 matching lines...) Expand all
171 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 171 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
172 172
173 DISALLOW_COPY_AND_ASSIGN(VrShell); 173 DISALLOW_COPY_AND_ASSIGN(VrShell);
174 }; 174 };
175 175
176 bool RegisterVrShell(JNIEnv* env); 176 bool RegisterVrShell(JNIEnv* env);
177 177
178 } // namespace vr_shell 178 } // namespace vr_shell
179 179
180 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 180 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698