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

Unified Diff: chrome/browser/chrome_browser_main_win.cc

Issue 10826223: Replace PeekMessage for TSF awareness (Closed) Base URL: http://git.chromium.org/chromium/src.git@yukawa
Patch Set: nitpick 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 | « chrome/browser/chrome_browser_main_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b2f8b721810472800f3cf3d6cfbfc0e18fed8ac2..e1385bba4666cb735367dd9803d5cbedf8076779 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()) {
+ // Create a TSF message filter for the message loop. MessageLoop takes
+ // ownership of the filter.
+ scoped_ptr<base::win::TextServicesMessageFilter> tsf_message_filter(
+ new base::win::TextServicesMessageFilter);
+ if (tsf_message_filter->Init()) {
+ MessageLoopForUI::current()->SetMessageFilter(
+ tsf_message_filter.PassAs<MessageLoopForUI::MessageFilter>());
+ }
+ }
+}
+
// static
void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment(
const CommandLine& parsed_command_line) {
« no previous file with comments | « chrome/browser/chrome_browser_main_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698