Index: ui/base/win/tsf_bridge.h |
diff --git a/ui/base/win/tsf_bridge.h b/ui/base/win/tsf_bridge.h |
index 23ae9f333b6bcc84a1e221142f3ed17c4cf24ddc..f7dc74df6c1cac8b434be11ab00f55bde52d62ba 100644 |
--- a/ui/base/win/tsf_bridge.h |
+++ b/ui/base/win/tsf_bridge.h |
@@ -23,17 +23,22 @@ class TextInputClient; |
// of text inputting and current focused TextInputClient. |
// |
// All methods in this class must be used in UI thread. |
-class TsfBridge { |
+class UI_EXPORT TsfBridge { |
public: |
virtual ~TsfBridge(); |
// Returns the thread local TsfBridge instance. Initialize() must be called |
// first. Do not cache this pointer and use it after TsfBridge Shutdown(). |
- static UI_EXPORT TsfBridge* GetInstance(); |
+ static TsfBridge* GetInstance(); |
// Sets the thread local instance. Must be called before any calls to |
// GetInstance(). |
- static UI_EXPORT bool Initialize(); |
+ static bool Initialize(); |
+ |
+ // Injects an alternative TsfBridge such as MockTsfBridge for testing. The |
+ // injected object should be released by the caller. This function returns |
+ // previous TsfBridge pointer with ownership. |
+ static TsfBridge* ReplaceForTesting(TsfBridge* bridge); |
// Destroys the thread local instance. |
virtual void Shutdown() = 0; |