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

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

Issue 2866853002: VR: Wire VrShell UI-related state to the scene manager. (Closed)
Patch Set: Rebase; remove now-unused source file. Created 3 years, 7 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 jboolean can_go_forward); 123 jboolean can_go_forward);
124 124
125 void ContentWebContentsDestroyed(); 125 void ContentWebContentsDestroyed();
126 // Called when our WebContents have been hidden. Usually a sign that something 126 // Called when our WebContents have been hidden. Usually a sign that something
127 // like another tab placed in front of it. 127 // like another tab placed in front of it.
128 void ContentWasHidden(); 128 void ContentWasHidden();
129 void ContentWasShown(); 129 void ContentWasShown();
130 130
131 void ContentSurfaceChanged(jobject surface); 131 void ContentSurfaceChanged(jobject surface);
132 void GvrDelegateReady(); 132 void GvrDelegateReady();
133 void AppButtonGesturePerformed(UiInterface::Direction direction);
134 133
135 void ContentPhysicalBoundsChanged( 134 void ContentPhysicalBoundsChanged(
136 JNIEnv* env, 135 JNIEnv* env,
137 const base::android::JavaParamRef<jobject>& object, 136 const base::android::JavaParamRef<jobject>& object,
138 jint width, 137 jint width,
139 jint height, 138 jint height,
140 jfloat dpr); 139 jfloat dpr);
141 140
142 // Perform a UI action triggered by the javascript API. 141 // Perform a UI action triggered by the javascript API.
143 void DoUiAction(const UiAction action, 142 void DoUiAction(const UiAction action,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 uint32_t device_id) override; 177 uint32_t device_id) override;
179 178
180 // device::PresentingGvrDelegate implementation. 179 // device::PresentingGvrDelegate implementation.
181 void SetSubmitClient( 180 void SetSubmitClient(
182 device::mojom::VRSubmitFrameClientPtr submit_client) override; 181 device::mojom::VRSubmitFrameClientPtr submit_client) override;
183 182
184 void ProcessTabArray(JNIEnv* env, jobjectArray tabs, bool incognito); 183 void ProcessTabArray(JNIEnv* env, jobjectArray tabs, bool incognito);
185 184
186 bool vr_shell_enabled_; 185 bool vr_shell_enabled_;
187 186
188 std::unique_ptr<UiInterface> ui_;
189 bool content_paused_ = false; 187 bool content_paused_ = false;
190 bool webvr_mode_ = false; 188 bool webvr_mode_ = false;
191 189
192 content::WebContents* web_contents_ = nullptr; 190 content::WebContents* web_contents_ = nullptr;
193 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_; 191 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_;
194 ui::WindowAndroid* window_; 192 ui::WindowAndroid* window_;
195 std::unique_ptr<VrCompositor> compositor_; 193 std::unique_ptr<VrCompositor> compositor_;
196 194
197 std::unique_ptr<VrWebContentsObserver> vr_web_contents_observer_; 195 std::unique_ptr<VrWebContentsObserver> vr_web_contents_observer_;
198 196
199 VrShellDelegate* delegate_provider_ = nullptr; 197 VrShellDelegate* delegate_provider_ = nullptr;
200 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; 198 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
201 199
202 std::unique_ptr<VrInputManager> input_manager_; 200 std::unique_ptr<VrInputManager> input_manager_;
203 std::unique_ptr<AndroidUiGestureTarget> android_ui_gesture_target_; 201 std::unique_ptr<AndroidUiGestureTarget> android_ui_gesture_target_;
204 std::unique_ptr<VrMetricsHelper> metrics_helper_; 202 std::unique_ptr<VrMetricsHelper> metrics_helper_;
205 203
206 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 204 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
207 std::unique_ptr<VrGLThread> gl_thread_; 205 std::unique_ptr<VrGLThread> gl_thread_;
206 UiInterface* ui_;
208 bool reprojected_rendering_; 207 bool reprojected_rendering_;
209 208
210 jobject content_surface_ = nullptr; 209 jobject content_surface_ = nullptr;
211 210
212 // TODO(mthiesse): Remove the need for this to be stored here. 211 // TODO(mthiesse): Remove the need for this to be stored here.
213 // crbug.com/674594 212 // crbug.com/674594
214 gvr_context* gvr_api_; 213 gvr_context* gvr_api_;
215 214
216 // Are we currently providing a gamepad factory to the gamepad manager? 215 // Are we currently providing a gamepad factory to the gamepad manager?
217 bool gamepad_source_active_ = false; 216 bool gamepad_source_active_ = false;
218 // Registered fetcher, must remain alive for UpdateGamepadData calls. 217 // Registered fetcher, must remain alive for UpdateGamepadData calls.
219 // That's ok since the fetcher is only destroyed from VrShell's destructor. 218 // That's ok since the fetcher is only destroyed from VrShell's destructor.
220 device::GvrGamepadDataFetcher* gamepad_data_fetcher_ = nullptr; 219 device::GvrGamepadDataFetcher* gamepad_data_fetcher_ = nullptr;
221 220
222 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 221 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
223 222
224 DISALLOW_COPY_AND_ASSIGN(VrShell); 223 DISALLOW_COPY_AND_ASSIGN(VrShell);
225 }; 224 };
226 225
227 bool RegisterVrShell(JNIEnv* env); 226 bool RegisterVrShell(JNIEnv* env);
228 227
229 } // namespace vr_shell 228 } // namespace vr_shell
230 229
231 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 230 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.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