| 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 import "gpu/ipc/common/mailbox_holder.mojom"; | 8 import "gpu/ipc/common/mailbox_holder.mojom"; |
| 9 import "gpu/ipc/common/sync_token.mojom"; | 9 import "gpu/ipc/common/sync_token.mojom"; |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 enum VRDisplayEventReason { | 67 enum VRDisplayEventReason { |
| 68 NONE = 0, | 68 NONE = 0, |
| 69 NAVIGATION = 1, | 69 NAVIGATION = 1, |
| 70 MOUNTED = 2, | 70 MOUNTED = 2, |
| 71 UNMOUNTED = 3 | 71 UNMOUNTED = 3 |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about | 74 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about |
| 75 // how to use and where they live. | 75 // how to use and where they live. |
| 76 interface VRService { | 76 interface VRService { |
| 77 // TODO(shaobo.yan@intel.com) : Use a factory function which took a | 77 // TODO(shaobo.yan@intel.com, crbug/701027): Use a factory function which |
| 78 // VRServiceClient so we would never have a half-initialized VRService. | 78 // takes a VRServiceClient so we will never have a half-initialized VRService. |
| 79 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); | 79 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); |
| 80 // Inform the service that the page is listening for vrdisplayactivate events. | 80 // Inform the service that the page is listening for vrdisplayactivate events. |
| 81 SetListeningForActivate(bool listening); | 81 SetListeningForActivate(bool listening); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 interface VRServiceClient { | 84 interface VRServiceClient { |
| 85 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, | 85 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, |
| 86 VRDisplayInfo displayInfo); | 86 VRDisplayInfo displayInfo); |
| 87 }; | 87 }; |
| 88 | 88 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 interface VRDisplayClient { | 116 interface VRDisplayClient { |
| 117 OnChanged(VRDisplayInfo display); | 117 OnChanged(VRDisplayInfo display); |
| 118 OnExitPresent(); | 118 OnExitPresent(); |
| 119 OnBlur(); | 119 OnBlur(); |
| 120 OnFocus(); | 120 OnFocus(); |
| 121 OnActivate(VRDisplayEventReason reason); | 121 OnActivate(VRDisplayEventReason reason); |
| 122 OnDeactivate(VRDisplayEventReason reason); | 122 OnDeactivate(VRDisplayEventReason reason); |
| 123 }; | 123 }; |
| OLD | NEW |