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

Unified Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 372075: Use renderer spellchecker for windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: inline Created 11 years, 1 month 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/profile.cc ('k') | chrome/browser/spellcheck_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/browser_render_process_host.cc
===================================================================
--- chrome/browser/renderer_host/browser_render_process_host.cc (revision 31826)
+++ chrome/browser/renderer_host/browser_render_process_host.cc (working copy)
@@ -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 @@
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));
}
}
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/spellcheck_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698