| 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 "device/wake_lock/public/interfaces/wake_lock_service.mojom"; | 7 import "device/wake_lock/public/interfaces/wake_lock_service.mojom"; |
| 8 | 8 |
| 9 enum WakeLockType { | 9 enum WakeLockType { |
| 10 // Prevent the application from being suspended. On some platforms, apps may | 10 // Prevent the application from being suspended. On some platforms, apps may |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 ReasonAudioPlayback = 0, | 26 ReasonAudioPlayback = 0, |
| 27 // Video is being played. | 27 // Video is being played. |
| 28 ReasonVideoPlayback = 1, | 28 ReasonVideoPlayback = 1, |
| 29 // WakeLock for some other reason. | 29 // WakeLock for some other reason. |
| 30 ReasonOther = 2, | 30 ReasonOther = 2, |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // Context in which WakeLockService instances operate. | 33 // Context in which WakeLockService instances operate. |
| 34 interface WakeLockContext { | 34 interface WakeLockContext { |
| 35 // Gets a WakeLockService within this context. | 35 // Gets a WakeLockService within this context. |
| 36 GetWakeLock(WakeLockType type, WakeLockReason reason, string description, Wake
LockService& wake_lock); | 36 GetWakeLock(WakeLockType type, |
| 37 WakeLockReason reason, |
| 38 string description, |
| 39 WakeLockService& wake_lock); |
| 37 }; | 40 }; |
| OLD | NEW |