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

Unified Diff: ui/base/win/tsf_bridge.h

Issue 10912171: Introduce RenderWidgetHostViewWinTest for Tsf handling (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 8 years, 3 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/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;

Powered by Google App Engine
This is Rietveld 408576698