diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 01:36:50 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 01:36:50 +0000 |
commit | 4e1c76f34b910c6e9a832cbac2e2bcce8acc9f52 (patch) | |
tree | c92007614f63d5eee9d1a7c85a5834f9603000fe /chrome/browser/renderer_host | |
parent | 3c5ed2c5747de75351c18fbf1e969eccc263d1d5 (diff) | |
download | chromium_src-4e1c76f34b910c6e9a832cbac2e2bcce8acc9f52.zip chromium_src-4e1c76f34b910c6e9a832cbac2e2bcce8acc9f52.tar.gz chromium_src-4e1c76f34b910c6e9a832cbac2e2bcce8acc9f52.tar.bz2 |
Use renderer spellchecker for windows.
BUG=25677
Review URL: http://codereview.chromium.org/372075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index ca3b1f3..1a301ee 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -57,6 +57,7 @@ #include "grit/generated_resources.h" #include "ipc/ipc_logging.h" #include "ipc/ipc_message.h" +#include "ipc/ipc_platform_file.h" #include "ipc/ipc_switches.h" #if defined(OS_WIN) @@ -1125,13 +1126,24 @@ void BrowserRenderProcessHost::InitSpellChecker() { SpellCheckHost* spellcheck_host = profile()->GetSpellCheckHost(); if (spellcheck_host) { PrefService* prefs = profile()->GetPrefs(); + IPC::PlatformFileForTransit file; +#if defined(OS_POSIX) + file = base::FileDescriptor(spellcheck_host->bdict_file(), false); +#elif defined(OS_WIN) + ::DuplicateHandle(::GetCurrentProcess(), spellcheck_host->bdict_file(), + process().handle(), &file, + 0, false, DUPLICATE_SAME_ACCESS); +#endif Send(new ViewMsg_SpellChecker_Init( - spellcheck_host->bdict_fd(), spellcheck_host->custom_words(), + file, + spellcheck_host->custom_words(), spellcheck_host->language(), prefs->GetBoolean(prefs::kEnableAutoSpellCorrect))); } else { Send(new ViewMsg_SpellChecker_Init( - base::FileDescriptor(), std::vector<std::string>(), std::string(), + IPC::PlatformFileForTransit(), + std::vector<std::string>(), + std::string(), false)); } } |