 Chromium Code Reviews
 Chromium Code Reviews Issue 2805763004:
  [System-Keyboard-Lock] Forward navigator functions to RenderFrameHost  (Closed)
    
  
    Issue 2805763004:
  [System-Keyboard-Lock] Forward navigator functions to RenderFrameHost  (Closed) 
  | Index: third_party/WebKit/public/platform/modules/keyboard_lock/keyboard_lock.mojom | 
| diff --git a/third_party/WebKit/public/platform/modules/keyboard_lock/keyboard_lock.mojom b/third_party/WebKit/public/platform/modules/keyboard_lock/keyboard_lock.mojom | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..60c0caf423746d030b9ee0a60d655336c23d158e | 
| --- /dev/null | 
| +++ b/third_party/WebKit/public/platform/modules/keyboard_lock/keyboard_lock.mojom | 
| @@ -0,0 +1,21 @@ | 
| +// Copyright 2017 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +module blink.mojom; | 
| + | 
| +// The browser side service to process navigator.requestKeyLock() and | 
| +// navigator.cancelKeyLock() web APIs. See http://crbug.com/680809. | 
| +interface KeyboardLockService { | 
| + // Registers a set of string-formatted key codes | 
| + // (https://www.w3.org/TR/uievents/#interface-keyboardevent) to the platform | 
| + // dependent native API, so the web page can receive these key codes | 
| + // thereafter. | 
| + // The reason will only be provided if the request is rejected. | 
| 
foolip
2017/04/17 08:46:05
Does mojo support optional arguments? In that case
 
Hzj_jie
2017/04/18 02:26:08
mojo supports optional array<string>?. But here we
 
foolip
2017/04/18 05:10:57
Acknowledged.
 | 
| + RequestKeyLock(array<string> key_codes) | 
| + => (bool allowed_by_user_or_browser, string reason); | 
| + | 
| + // Removes all reserved keys. This function is expected to never fail, the | 
| + // callback indicates the finish of the processing only. | 
| + CancelKeyLock() => (); | 
| +}; |