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

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

Issue 2833773005: Pause drawing webvr when the App button is pressed (Closed)
Patch Set: nit 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 <utility> 10 #include <utility>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 210 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
211 base::CancelableClosure vsync_task_; 211 base::CancelableClosure vsync_task_;
212 base::TimeTicks vsync_timebase_; 212 base::TimeTicks vsync_timebase_;
213 base::TimeDelta vsync_interval_; 213 base::TimeDelta vsync_interval_;
214 214
215 base::TimeDelta pending_time_; 215 base::TimeDelta pending_time_;
216 bool pending_vsync_ = false; 216 bool pending_vsync_ = false;
217 GetVSyncCallback callback_; 217 GetVSyncCallback callback_;
218 bool received_frame_ = false; 218 bool received_frame_ = false;
219 bool content_paused_ = false;
219 mojo::Binding<device::mojom::VRVSyncProvider> binding_; 220 mojo::Binding<device::mojom::VRVSyncProvider> binding_;
220 device::mojom::VRSubmitFrameClientPtr submit_client_; 221 device::mojom::VRSubmitFrameClientPtr submit_client_;
221 222
222 base::WeakPtr<VrShell> weak_vr_shell_; 223 base::WeakPtr<VrShell> weak_vr_shell_;
223 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 224 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
224 225
225 UiScene* scene_ = nullptr; 226 UiScene* scene_ = nullptr;
226 227
227 uint8_t frame_index_ = 0; 228 uint8_t frame_index_ = 0;
228 // Larger than frame_index_ so it can be initialized out-of-band. 229 // Larger than frame_index_ so it can be initialized out-of-band.
229 uint16_t last_frame_index_ = -1; 230 uint16_t last_frame_index_ = -1;
230 231
231 // Attributes for gesture detection while holding app button. 232 // Attributes for gesture detection while holding app button.
232 gfx::Vector3dF controller_start_direction_; 233 gfx::Vector3dF controller_start_direction_;
233 234
234 std::unique_ptr<FPSMeter> fps_meter_; 235 std::unique_ptr<FPSMeter> fps_meter_;
235 236
236 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 237 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
237 238
238 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 239 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
239 }; 240 };
240 241
241 } // namespace vr_shell 242 } // namespace vr_shell
242 243
243 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 244 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698