| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void NotifyKeyboardBoundsChanging(const gfx::Rect& new_bounds); | 82 void NotifyKeyboardBoundsChanging(const gfx::Rect& new_bounds); |
| 83 | 83 |
| 84 // Management of the observer list. | 84 // Management of the observer list. |
| 85 virtual void AddObserver(KeyboardControllerObserver* observer); | 85 virtual void AddObserver(KeyboardControllerObserver* observer); |
| 86 virtual void RemoveObserver(KeyboardControllerObserver* observer); | 86 virtual void RemoveObserver(KeyboardControllerObserver* observer); |
| 87 | 87 |
| 88 KeyboardUI* ui() { return ui_.get(); } | 88 KeyboardUI* ui() { return ui_.get(); } |
| 89 | 89 |
| 90 void set_lock_keyboard(bool lock) { lock_keyboard_ = lock; } | 90 void set_lock_keyboard(bool lock) { lock_keyboard_ = lock; } |
| 91 | 91 |
| 92 bool get_lock_keyboard() const { return lock_keyboard_; } |
| 93 |
| 92 KeyboardMode keyboard_mode() const { return keyboard_mode_; } | 94 KeyboardMode keyboard_mode() const { return keyboard_mode_; } |
| 93 | 95 |
| 94 void SetKeyboardMode(KeyboardMode mode); | 96 void SetKeyboardMode(KeyboardMode mode); |
| 95 | 97 |
| 96 // Force the keyboard to show up if not showing and lock the keyboard if | 98 // Force the keyboard to show up if not showing and lock the keyboard if |
| 97 // |lock| is true. | 99 // |lock| is true. |
| 98 void ShowKeyboard(bool lock); | 100 void ShowKeyboard(bool lock); |
| 99 | 101 |
| 100 // Sets the active keyboard controller. KeyboardController takes ownership of | 102 // Sets the active keyboard controller. KeyboardController takes ownership of |
| 101 // the instance. Calling ResetIntance with a new instance destroys the | 103 // the instance. Calling ResetIntance with a new instance destroys the |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 static KeyboardController* instance_; | 172 static KeyboardController* instance_; |
| 171 | 173 |
| 172 base::WeakPtrFactory<KeyboardController> weak_factory_; | 174 base::WeakPtrFactory<KeyboardController> weak_factory_; |
| 173 | 175 |
| 174 DISALLOW_COPY_AND_ASSIGN(KeyboardController); | 176 DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
| 175 }; | 177 }; |
| 176 | 178 |
| 177 } // namespace keyboard | 179 } // namespace keyboard |
| 178 | 180 |
| 179 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 181 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
| OLD | NEW |