Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: ui/keyboard/keyboard_controller.h

Issue 219503003: Make keyboard controller a singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/keyboard/keyboard_controller.h
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index 86cd12dd760cccca9e7e359dc8a8105bf7b51012..a494e1e824fb587f923854629d2cc14b0176718b 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -81,6 +81,12 @@ 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.
sadrul 2014/03/31 18:44:10 Mention that the caller does not own the controlle
kevers 2014/04/01 15:57:10 Done.
+ 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 +134,8 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
base::WeakPtrFactory<KeyboardController> weak_factory_;
+ static KeyboardController* instance_;
+
DISALLOW_COPY_AND_ASSIGN(KeyboardController);
};

Powered by Google App Engine
This is Rietveld 408576698