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 #ifndef UI_KEYBOARD_KEYBOARD_UI_H_ | 5 #ifndef UI_KEYBOARD_KEYBOARD_UI_H_ |
6 #define UI_KEYBOARD_KEYBOARD_UI_H_ | 6 #define UI_KEYBOARD_KEYBOARD_UI_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/base/ime/text_input_type.h" | 9 #include "ui/base/ime/text_input_type.h" |
10 #include "ui/keyboard/keyboard_export.h" | 10 #include "ui/keyboard/keyboard_export.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 KeyboardUI(); | 29 KeyboardUI(); |
30 virtual ~KeyboardUI(); | 30 virtual ~KeyboardUI(); |
31 | 31 |
32 // Gets the virtual keyboard window. May return null if the window has not yet | 32 // Gets the virtual keyboard window. May return null if the window has not yet |
33 // been created. | 33 // been created. |
34 virtual aura::Window* GetKeyboardWindow() = 0; | 34 virtual aura::Window* GetKeyboardWindow() = 0; |
35 | 35 |
36 // Whether the keyboard window has been created. | 36 // Whether the keyboard window has been created. |
37 virtual bool HasKeyboardWindow() const = 0; | 37 virtual bool HasKeyboardWindow() const = 0; |
38 | 38 |
| 39 // Whether this window should do an overscroll to avoid occlusion by the |
| 40 // virtual keyboard. IME windows and virtual keyboard windows should always |
| 41 // avoid overscroll. |
| 42 virtual bool ShouldWindowOverscroll(aura::Window* window) const = 0; |
| 43 |
39 // Gets the InputMethod that will provide notifications about changes in the | 44 // Gets the InputMethod that will provide notifications about changes in the |
40 // text input context. | 45 // text input context. |
41 virtual ui::InputMethod* GetInputMethod() = 0; | 46 virtual ui::InputMethod* GetInputMethod() = 0; |
42 | 47 |
43 // Shows the container window of the keyboard. The default implementation | 48 // Shows the container window of the keyboard. The default implementation |
44 // simply shows the container. An overridden implementation can set up | 49 // simply shows the container. An overridden implementation can set up |
45 // necessary animation, or delay the visibility change as it desires. | 50 // necessary animation, or delay the visibility change as it desires. |
46 virtual void ShowKeyboardContainer(aura::Window* container); | 51 virtual void ShowKeyboardContainer(aura::Window* container); |
47 | 52 |
48 // Hides the container window of the keyboard. The default implementation | 53 // Hides the container window of the keyboard. The default implementation |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 90 |
86 private: | 91 private: |
87 keyboard::KeyboardController* keyboard_controller_; | 92 keyboard::KeyboardController* keyboard_controller_; |
88 | 93 |
89 DISALLOW_COPY_AND_ASSIGN(KeyboardUI); | 94 DISALLOW_COPY_AND_ASSIGN(KeyboardUI); |
90 }; | 95 }; |
91 | 96 |
92 } // namespace keyboard | 97 } // namespace keyboard |
93 | 98 |
94 #endif // UI_KEYBOARD_KEYBOARD_UI_H_ | 99 #endif // UI_KEYBOARD_KEYBOARD_UI_H_ |
OLD | NEW |