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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 void NotifyKeyboardBoundsChanging(const gfx::Rect& new_bounds); | 72 void NotifyKeyboardBoundsChanging(const gfx::Rect& new_bounds); |
73 | 73 |
74 // Management of the observer list. | 74 // Management of the observer list. |
75 virtual void AddObserver(KeyboardControllerObserver* observer); | 75 virtual void AddObserver(KeyboardControllerObserver* observer); |
76 virtual void RemoveObserver(KeyboardControllerObserver* observer); | 76 virtual void RemoveObserver(KeyboardControllerObserver* observer); |
77 | 77 |
78 KeyboardControllerProxy* proxy() { return proxy_.get(); } | 78 KeyboardControllerProxy* proxy() { return proxy_.get(); } |
79 | 79 |
80 void set_lock_keyboard(bool lock) { lock_keyboard_ = lock; } | 80 void set_lock_keyboard(bool lock) { lock_keyboard_ = lock; } |
81 | 81 |
| 82 // Force the keyboard to show up if not showing and lock the keyboard. |
| 83 void ShowAndLockKeyboard(); |
| 84 |
82 private: | 85 private: |
83 // For access to Observer methods for simulation. | 86 // For access to Observer methods for simulation. |
84 friend class KeyboardControllerTest; | 87 friend class KeyboardControllerTest; |
85 | 88 |
86 // aura::WindowObserver overrides | 89 // aura::WindowObserver overrides |
87 virtual void OnWindowHierarchyChanged( | 90 virtual void OnWindowHierarchyChanged( |
88 const HierarchyChangeParams& params) OVERRIDE; | 91 const HierarchyChangeParams& params) OVERRIDE; |
89 | 92 |
90 // InputMethodObserver overrides | 93 // InputMethodObserver overrides |
91 virtual void OnTextInputTypeChanged( | 94 virtual void OnTextInputTypeChanged( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ObserverList<KeyboardControllerObserver> observer_list_; | 127 ObserverList<KeyboardControllerObserver> observer_list_; |
125 | 128 |
126 base::WeakPtrFactory<KeyboardController> weak_factory_; | 129 base::WeakPtrFactory<KeyboardController> weak_factory_; |
127 | 130 |
128 DISALLOW_COPY_AND_ASSIGN(KeyboardController); | 131 DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
129 }; | 132 }; |
130 | 133 |
131 } // namespace keyboard | 134 } // namespace keyboard |
132 | 135 |
133 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 136 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
OLD | NEW |