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

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

Issue 2510993002: Notify VRDeviceProviders when there are pages listening for vrdisplayactivate (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « device/vr/vr_device_provider.h ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // fou nd in the LICENSE file. 2 // Use of this source code is governed by a BSD-style license that can be // fou nd in the LICENSE file.
3 3
4 module device.mojom; 4 module device.mojom;
5 5
6 // A field of view, given by 4 degrees describing the view from a center point. 6 // A field of view, given by 4 degrees describing the view from a center point.
7 struct VRFieldOfView { 7 struct VRFieldOfView {
8 float upDegrees; 8 float upDegrees;
9 float downDegrees; 9 float downDegrees;
10 float leftDegrees; 10 float leftDegrees;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 NAVIGATION = 1, 68 NAVIGATION = 1,
69 MOUNTED = 2, 69 MOUNTED = 2,
70 UNMOUNTED = 3 70 UNMOUNTED = 3
71 }; 71 };
72 72
73 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about how to use and where they live. 73 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about how to use and where they live.
74 interface VRService { 74 interface VRService {
75 // TODO(shaobo.yan@intel.com) : Use a factory function which took a VRServiceC lient 75 // TODO(shaobo.yan@intel.com) : Use a factory function which took a VRServiceC lient
76 // so we would never have a half-initialized VRService. 76 // so we would never have a half-initialized VRService.
77 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); 77 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices);
78 // Inform the service that the page is listening for vrdisplayactivate events.
79 SetListeningForActivate(bool listening);
78 }; 80 };
79 81
80 interface VRServiceClient { 82 interface VRServiceClient {
81 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo); 83 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo);
82 }; 84 };
83 85
84 interface VRDisplay { 86 interface VRDisplay {
85 [Sync] 87 [Sync]
86 GetPose() => (VRPose? pose); 88 GetPose() => (VRPose? pose);
87 ResetPose(); 89 ResetPose();
88 90
89 RequestPresent(bool secureOrigin) => (bool success); 91 RequestPresent(bool secureOrigin) => (bool success);
90 ExitPresent(); 92 ExitPresent();
91 SubmitFrame(VRPose? pose); 93 SubmitFrame(VRPose? pose);
92 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds); 94 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
93 }; 95 };
94 96
95 interface VRDisplayClient { 97 interface VRDisplayClient {
96 OnChanged(VRDisplayInfo display); 98 OnChanged(VRDisplayInfo display);
97 OnExitPresent(); 99 OnExitPresent();
98 OnBlur(); 100 OnBlur();
99 OnFocus(); 101 OnFocus();
100 OnActivate(VRDisplayEventReason reason); 102 OnActivate(VRDisplayEventReason reason);
101 OnDeactivate(VRDisplayEventReason reason); 103 OnDeactivate(VRDisplayEventReason reason);
102 }; 104 };
OLDNEW
« no previous file with comments | « device/vr/vr_device_provider.h ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698