Index: chrome/browser/chrome_browser_main_win.cc |
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc |
index a03619dade95264634bcf9a49ca3509a770c3ad3..82a936a0db3c1ff38f0059d8203c23335c30d9df 100644 |
--- a/chrome/browser/chrome_browser_main_win.cc |
+++ b/chrome/browser/chrome_browser_main_win.cc |
@@ -18,6 +18,7 @@ |
#include "base/string_number_conversions.h" |
#include "base/utf_string_conversions.h" |
#include "base/win/metro.h" |
+#include "base/win/text_services_message_filter.h" |
#include "base/win/windows_version.h" |
#include "base/win/wrapped_window_proc.h" |
#include "chrome/browser/browser_util_win.h" |
@@ -188,6 +189,21 @@ void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() { |
new chrome::MediaDeviceNotificationsWindowWin(); |
} |
+void ChromeBrowserMainPartsWin::PostMainMessageLoopStart() { |
+ DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
+ |
+ if (base::win::IsTsfAwareRequired()) { |
+ // Sets TSF message filter to MessagePumpForUI. MessagePumpForUI has |
rvargas (doing something else)
2012/08/31 21:39:49
nit: this is not a fn declaration, so sets -> set.
yoichio
2012/09/03 04:45:08
Done.
|
+ // ownership of the instance. |
+ scoped_ptr<base::MessagePumpForUI::MessageFilter> tsf_message_filter( |
rvargas (doing something else)
2012/08/31 21:39:49
nit: there should be no need to mention the pump h
|
+ new base::win::TextServicesMessageFilter); |
+ if (tsf_message_filter->Init()) { |
+ MessageLoopForUI::current()->SetMessageFilter( |
+ tsf_message_filter.release()); |
+ } |
+ } |
+} |
+ |
// static |
void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( |
const CommandLine& parsed_command_line) { |