summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 00:33:38 +0000
committerkochi@chromium.org <kochi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-23 00:33:38 +0000
commit73ddc32bf65e55e26079044ee20a86e6d6039f35 (patch)
tree55e34620d38230e7c591dd0d6a21515d7a7bdcdf
parentc9f0d063867bf1b538476f04d71a8c9e14755111 (diff)
downloadchromium_src-73ddc32bf65e55e26079044ee20a86e6d6039f35.zip
chromium_src-73ddc32bf65e55e26079044ee20a86e6d6039f35.tar.gz
chromium_src-73ddc32bf65e55e26079044ee20a86e6d6039f35.tar.bz2
Move TSF IME initialization code from chrome to content.
Current the TSF IME handler (TextServicesMessageFilter) is created in chrome (chrome/browser/chrome_browser_main_win.cc). This should be moved to content/, that is IME should be functional for content, including being functional in content_shell. BUG=171176 TEST=run content_shell.exe on Win8 with --enable-text-services-framework and check manually if IME works Review URL: https://chromiumcodereview.appspot.com/15449002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201649 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chrome_browser_main_win.cc16
-rw-r--r--chrome/browser/chrome_browser_main_win.h1
-rw-r--r--content/browser/browser_main_loop.cc12
3 files changed, 12 insertions, 17 deletions
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index 925b843..6a54ecc 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -19,7 +19,6 @@
#include "base/strings/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"
@@ -200,21 +199,6 @@ void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() {
}
}
-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>());
- }
- }
-}
-
void ChromeBrowserMainPartsWin::PreProfileInit() {
storage_monitor_.reset(chrome::StorageMonitorWin::Create());
diff --git a/chrome/browser/chrome_browser_main_win.h b/chrome/browser/chrome_browser_main_win.h
index 78af86c..1648b4b 100644
--- a/chrome/browser/chrome_browser_main_win.h
+++ b/chrome/browser/chrome_browser_main_win.h
@@ -32,7 +32,6 @@ class ChromeBrowserMainPartsWin : public ChromeBrowserMainParts {
// BrowserParts overrides.
virtual void ToolkitInitialized() OVERRIDE;
virtual void PreMainMessageLoopStart() OVERRIDE;
- virtual void PostMainMessageLoopStart() OVERRIDE;
virtual void PreProfileInit() OVERRIDE;
virtual void PostProfileInit() OVERRIDE;
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 67ef5bd..8b40383 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -69,6 +69,7 @@
#include <commctrl.h>
#include <shellapi.h>
+#include "base/win/text_services_message_filter.h"
#include "content/browser/system_message_window_win.h"
#include "content/common/sandbox_win.h"
#include "net/base/winsock_init.h"
@@ -402,6 +403,17 @@ void BrowserMainLoop::MainMessageLoopStart() {
#if defined(OS_WIN)
system_message_window_.reset(new SystemMessageWindowWin);
+
+ 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>());
+ }
+ }
#endif
if (parts_)