OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 keyboard.mojom; | 5 module keyboard.mojom; |
6 | 6 |
7 import "ui/gfx/geometry/mojo/geometry.mojom"; | 7 import "ui/gfx/geometry/mojo/geometry.mojom"; |
8 | 8 |
9 interface KeyboardObserver { | 9 interface KeyboardObserver { |
10 // Sent any time state changes in the keyboard. | 10 // Sent any time state changes in the keyboard. |
11 OnKeyboardStateChanged(bool is_enabled, | 11 OnKeyboardStateChanged(bool is_enabled, |
12 bool is_visible, | 12 bool is_visible, |
13 uint64 display_id, | 13 uint64 display_id, |
14 mojo.Rect bounds); | 14 gfx.mojom.Rect bounds); |
15 }; | 15 }; |
16 | 16 |
17 interface Keyboard { | 17 interface Keyboard { |
18 // TODO(sky): needs display id. | 18 // TODO(sky): needs display id. |
19 Show(); | 19 Show(); |
20 Hide(); | 20 Hide(); |
21 | 21 |
22 // Adds an observer. OnKeyboardStateChanged() is immediately called to give | 22 // Adds an observer. OnKeyboardStateChanged() is immediately called to give |
23 // the initial state. | 23 // the initial state. |
24 AddObserver(KeyboardObserver observer); | 24 AddObserver(KeyboardObserver observer); |
25 }; | 25 }; |
OLD | NEW |