Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 enum VRDisplayEventReason { | 65 enum VRDisplayEventReason { |
| 66 NONE = 0, | 66 NONE = 0, |
| 67 NAVIGATION = 1, | 67 NAVIGATION = 1, |
| 68 MOUNTED = 2, | 68 MOUNTED = 2, |
| 69 UNMOUNTED = 3 | 69 UNMOUNTED = 3 |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about | 72 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about |
| 73 // how to use and where they live. | 73 // 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 | 75 // TODO(crbug/701027): Use a factory function which took a |
|
mthiesse
2017/03/13 22:17:29
Keep TODO(shaobo.yan@intel.com) and add the crbug
tiborg
2017/03/13 23:00:58
Done.
| |
| 76 // VRServiceClient so we would never have a half-initialized VRService. | 76 // VRServiceClient 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. | 78 // Inform the service that the page is listening for vrdisplayactivate events. |
| 79 SetListeningForActivate(bool listening); | 79 SetListeningForActivate(bool listening); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 interface VRServiceClient { | 82 interface VRServiceClient { |
| 83 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, | 83 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, |
| 84 VRDisplayInfo displayInfo); | 84 VRDisplayInfo displayInfo); |
| 85 }; | 85 }; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 interface VRDisplayClient { | 108 interface VRDisplayClient { |
| 109 OnChanged(VRDisplayInfo display); | 109 OnChanged(VRDisplayInfo display); |
| 110 OnExitPresent(); | 110 OnExitPresent(); |
| 111 OnBlur(); | 111 OnBlur(); |
| 112 OnFocus(); | 112 OnFocus(); |
| 113 OnActivate(VRDisplayEventReason reason); | 113 OnActivate(VRDisplayEventReason reason); |
| 114 OnDeactivate(VRDisplayEventReason reason); | 114 OnDeactivate(VRDisplayEventReason reason); |
| 115 }; | 115 }; |
| OLD | NEW |