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

Side by Side Diff: device/vr/vr_service.mojom

Issue 2711173002: Prevent browser crash resulting from misbehaving WebVR renderer requesting multiple VSyncs. (Closed)
Patch Set: rebase 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 module device.mojom; 5 module device.mojom;
6 6
7 import "mojo/common/time.mojom"; 7 import "mojo/common/time.mojom";
8 8
9 // A field of view, given by 4 degrees describing the view from a center point. 9 // A field of view, given by 4 degrees describing the view from a center point.
10 struct VRFieldOfView { 10 struct VRFieldOfView {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 RequestPresent(bool secureOrigin) => (bool success); 91 RequestPresent(bool secureOrigin) => (bool success);
92 ExitPresent(); 92 ExitPresent();
93 SubmitFrame(VRPose? pose); 93 SubmitFrame(VRPose? pose);
94 UpdateLayerBounds(int16 frameId, VRLayerBounds leftBounds, 94 UpdateLayerBounds(int16 frameId, VRLayerBounds leftBounds,
95 VRLayerBounds rightBounds); 95 VRLayerBounds rightBounds);
96 GetVRVSyncProvider(VRVSyncProvider& request); 96 GetVRVSyncProvider(VRVSyncProvider& request);
97 }; 97 };
98 98
99 interface VRVSyncProvider { 99 interface VRVSyncProvider {
100 enum Status { SUCCESS, RETRY };
101
100 // The frameId maps a VSync to a frame arriving from the compositor. IDs will 102 // The frameId maps a VSync to a frame arriving from the compositor. IDs will
101 // be reused after the frame arrives from the compositor. Negative IDs imply 103 // be reused after the frame arrives from the compositor. Negative IDs imply
102 // no mapping. 104 // no mapping.
103 GetVSync() => (VRPose? pose, mojo.common.mojom.TimeDelta time, int16 frameId); 105 GetVSync() => (VRPose? pose, mojo.common.mojom.TimeDelta time, int16 frameId,
106 Status status);
104 }; 107 };
105 108
106 interface VRDisplayClient { 109 interface VRDisplayClient {
107 OnChanged(VRDisplayInfo display); 110 OnChanged(VRDisplayInfo display);
108 OnExitPresent(); 111 OnExitPresent();
109 OnBlur(); 112 OnBlur();
110 OnFocus(); 113 OnFocus();
111 OnActivate(VRDisplayEventReason reason); 114 OnActivate(VRDisplayEventReason reason);
112 OnDeactivate(VRDisplayEventReason reason); 115 OnDeactivate(VRDisplayEventReason reason);
113 }; 116 };
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | third_party/WebKit/LayoutTests/vr/resources/mock-vr-service.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698