Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 blink.mojom; | 5 module blink.mojom; |
| 6 | 6 |
| 7 // The browser side service to process navigator.requestKeyLock() and | 7 enum KeyboardLockRequestResult { |
| 8 // navigator.cancelKeyLock() web APIs. See http://crbug.com/680809. | 8 SUCCESS = 0, |
| 9 FAILURE = 1, // Chrome never returns a failure. | |
|
dcheng
2017/05/02 07:38:16
Remove this comment, or just remove this enum valu
Hzj_jie
2017/05/02 22:12:07
I prefer to remove this value of enumeration.
Done
| |
| 10 }; | |
| 11 | |
| 12 // The browser side service to process navigator.requestKeyboardLock() and | |
| 13 // navigator.cancelKeyboardLock() web APIs. See http://crbug.com/680809. | |
| 9 interface KeyboardLockService { | 14 interface KeyboardLockService { |
| 10 // Registers a set of string-formatted key codes | 15 // Registers a set of string-formatted key codes |
| 11 // (https://www.w3.org/TR/uievents/#interface-keyboardevent) to the platform | 16 // (https://www.w3.org/TR/uievents/#interface-keyboardevent) to the platform |
| 12 // dependent native API, so the web page can receive these key codes | 17 // dependent native API, so the web page can receive these key codes |
| 13 // thereafter. | 18 // thereafter. |
| 14 // The reason will only be provided if the request is rejected. | 19 RequestKeyboardLock(array<string> key_codes) |
| 15 // TODO(zijiehe): Update the return type once it's defined in the spec. | 20 => (KeyboardLockRequestResult result); |
| 16 RequestKeyLock(array<string> key_codes) | |
| 17 => (bool allowed_by_user_or_browser, string reason); | |
| 18 | 21 |
| 19 // Removes all reserved keys. This function is expected to never fail. | 22 // Removes all reserved keys. This function is expected to never fail. |
| 20 CancelKeyLock(); | 23 CancelKeyboardLock(); |
| 21 }; | 24 }; |
| OLD | NEW |