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

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: use just PeekMessage for WM_PAINT/TIMER messages Created 8 years, 4 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
« base/message_pump_win.cc ('K') | « 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 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) {
« base/message_pump_win.cc ('K') | « 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