Index: ui/keyboard/keyboard_controller.h |
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h |
index 86cd12dd760cccca9e7e359dc8a8105bf7b51012..9196a23f1a344fea77a1d2b8fb11cc2617e3ddc8 100644 |
--- a/ui/keyboard/keyboard_controller.h |
+++ b/ui/keyboard/keyboard_controller.h |
@@ -81,6 +81,14 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver, |
// Force the keyboard to show up if not showing and lock the keyboard. |
void ShowAndLockKeyboard(); |
+ // Sets the active keyboard controller. KeyboardController takes ownership of |
+ // the instance. Calling ResetIntance with a new instance destroys the |
+ // previous one. May be called with NULL to clear the instance. |
+ static void ResetInstance(KeyboardController* controller); |
+ |
+ // Retrieve the active keyboard controller. |
+ static KeyboardController* GetInstance(); |
+ |
private: |
// For access to Observer methods for simulation. |
friend class KeyboardControllerTest; |
@@ -128,6 +136,8 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver, |
base::WeakPtrFactory<KeyboardController> weak_factory_; |
+ static KeyboardController* instance_; |
+ |
DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
}; |