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

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: Address comment 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 Error {
101 ERROR_NONE,
dcheng 2017/02/23 19:36:58 Nit: Error => Status { SUCCESS, TRY_AGAIN }; ?
mthiesse 2017/02/23 20:39:58 Fun fact, I can't use TRY_AGAIN as an enum value,
102 ERROR_TRY_AGAIN,
103 ERROR_BAD_REQUEST,
dcheng 2017/02/23 19:36:58 I would just omit BAD_REQUEST from the enum comple
mthiesse 2017/02/23 19:41:35 How would you recommend we handle the bad request
dcheng 2017/02/23 19:45:27 We shouldn't have to invoke the callback on a bad
mthiesse 2017/02/23 20:39:58 Acknowledged.
104 };
105
100 // The frameId maps a VSync to a frame arriving from the compositor. IDs will 106 // 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 107 // be reused after the frame arrives from the compositor. Negative IDs imply
102 // no mapping. 108 // no mapping.
103 GetVSync() => (VRPose? pose, mojo.common.mojom.TimeDelta time, int16 frameId); 109 GetVSync() => (VRPose? pose, mojo.common.mojom.TimeDelta time, int16 frameId, Error error);
dcheng 2017/02/23 19:36:58 Nit: 80 chars
mthiesse 2017/02/23 20:39:58 Done.
104 }; 110 };
105 111
106 interface VRDisplayClient { 112 interface VRDisplayClient {
107 OnChanged(VRDisplayInfo display); 113 OnChanged(VRDisplayInfo display);
108 OnExitPresent(); 114 OnExitPresent();
109 OnBlur(); 115 OnBlur();
110 OnFocus(); 116 OnFocus();
111 OnActivate(VRDisplayEventReason reason); 117 OnActivate(VRDisplayEventReason reason);
112 OnDeactivate(VRDisplayEventReason reason); 118 OnDeactivate(VRDisplayEventReason reason);
113 }; 119 };
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