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

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

Issue 13235003: Support the Text services framework based IME for Chrome AURA on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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/ime/win/tsf_bridge.h ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/win/tsf_bridge.cc
===================================================================
--- ui/base/ime/win/tsf_bridge.cc (revision 194055)
+++ ui/base/ime/win/tsf_bridge.cc (working copy)
@@ -44,6 +44,7 @@
TextInputClient* client) OVERRIDE;
virtual void RemoveFocusedClient(TextInputClient* client) OVERRIDE;
virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() OVERRIDE;
+ virtual TextInputClient* GetFocusedTextInputClient() const OVERRIDE;
private:
friend struct DefaultSingletonTraits<TSFBridgeDelegate>;
@@ -272,6 +273,10 @@
}
}
+TextInputClient* TSFBridgeDelegate::GetFocusedTextInputClient() const {
+ return client_;
+}
+
base::win::ScopedComPtr<ITfThreadMgr> TSFBridgeDelegate::GetThreadManager() {
DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
DCHECK(IsInitialized());
@@ -438,10 +443,13 @@
DVLOG(1) << "Do not use TSFBridge without UI thread.";
return false;
}
- tls_tsf_bridge.Initialize(TSFBridge::Finalize);
- TSFBridgeDelegate* delegate = new TSFBridgeDelegate();
- tls_tsf_bridge.Set(delegate);
- return delegate->Initialize();
+ if (!tls_tsf_bridge.initialized()) {
+ tls_tsf_bridge.Initialize(TSFBridge::Finalize);
+ TSFBridgeDelegate* delegate = new TSFBridgeDelegate();
+ tls_tsf_bridge.Set(delegate);
+ return delegate->Initialize();
+ }
+ return true;
}
// static
« no previous file with comments | « ui/base/ime/win/tsf_bridge.h ('k') | ui/views/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698