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

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

Issue 10912171: Introduce RenderWidgetHostViewWinTest for Tsf handling (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « ui/base/win/tsf_bridge.h ('k') | ui/ui_unittests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/tsf_bridge.cc
diff --git a/ui/base/win/tsf_bridge.cc b/ui/base/win/tsf_bridge.cc
index 75f18057cb8af36939e366dc720dc9230aeffc49..1db1f17f8d7d31623062a7e59e10cfe0e3355836 100644
--- a/ui/base/win/tsf_bridge.cc
+++ b/ui/base/win/tsf_bridge.cc
@@ -463,6 +463,17 @@ bool TsfBridge::Initialize() {
}
// static
+TsfBridge* TsfBridge::ReplaceForTesting(TsfBridge* bridge) {
+ if (MessageLoop::current()->type() != MessageLoop::TYPE_UI) {
+ VLOG(1) << "Do not use TsfBridge without UI thread.";
+ return NULL;
+ }
+ TsfBridge* old_bridge = TsfBridge::GetInstance();
+ tls_tsf_bridge.Set(bridge);
+ return old_bridge;
+}
+
+// static
TsfBridge* TsfBridge::GetInstance() {
if (MessageLoop::current()->type() != MessageLoop::TYPE_UI) {
VLOG(1) << "Do not use TsfBridge without UI thread.";
« no previous file with comments | « ui/base/win/tsf_bridge.h ('k') | ui/ui_unittests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698