OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CONTROLLER_H_ | 5 #ifndef UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/event_types.h" | 9 #include "base/event_types.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class TextInputClient; | 24 class TextInputClient; |
25 } | 25 } |
26 | 26 |
27 namespace keyboard { | 27 namespace keyboard { |
28 | 28 |
29 class CallbackAnimationObserver; | 29 class CallbackAnimationObserver; |
30 class WindowBoundsChangeObserver; | 30 class WindowBoundsChangeObserver; |
31 class KeyboardControllerObserver; | 31 class KeyboardControllerObserver; |
32 class KeyboardControllerProxy; | 32 class KeyboardControllerProxy; |
33 | 33 |
| 34 // Animation distance. |
| 35 const int kAnimationDistance = 30; |
| 36 |
34 // Provides control of the virtual keyboard, including providing a container | 37 // Provides control of the virtual keyboard, including providing a container |
35 // and controlling visibility. | 38 // and controlling visibility. |
36 class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver, | 39 class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver, |
37 public aura::WindowObserver { | 40 public aura::WindowObserver { |
38 public: | 41 public: |
39 // Different ways to hide the keyboard. | 42 // Different ways to hide the keyboard. |
40 enum HideReason { | 43 enum HideReason { |
41 // System initiated. | 44 // System initiated. |
42 HIDE_REASON_AUTOMATIC, | 45 HIDE_REASON_AUTOMATIC, |
43 // User initiated. | 46 // User initiated. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 gfx::Rect current_keyboard_bounds_; | 169 gfx::Rect current_keyboard_bounds_; |
167 | 170 |
168 static KeyboardController* instance_; | 171 static KeyboardController* instance_; |
169 | 172 |
170 DISALLOW_COPY_AND_ASSIGN(KeyboardController); | 173 DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
171 }; | 174 }; |
172 | 175 |
173 } // namespace keyboard | 176 } // namespace keyboard |
174 | 177 |
175 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 178 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
OLD | NEW |