Removes ifdefs in browser_render_process_host.cc that prevented

adding custom words to the dictionary on platforms other than 
windows. This functionality has now been implemented on all
platforms. Patch from pwicks86@gmail.com (Paul Wicks)
BUG=None
TEST=Adding words to dictionary on mac and linux.

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20144 0039d316-1c4b-4281-b951-d872f2087c98
parent 62464e04
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "chrome/browser/renderer_host/render_widget_host.h" #include "chrome/browser/renderer_host/render_widget_host.h"
#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/browser/renderer_host/web_cache_manager.h" #include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/spellchecker.h"
#include "chrome/browser/visitedlink_master.h" #include "chrome/browser/visitedlink_master.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_descriptors.h" #include "chrome/common/chrome_descriptors.h"
...@@ -66,7 +67,6 @@ using WebKit::WebCache; ...@@ -66,7 +67,6 @@ using WebKit::WebCache;
// TODO(port): see comment by the only usage of RenderViewHost in this file. // TODO(port): see comment by the only usage of RenderViewHost in this file.
#include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/spellchecker.h"
// Once the above TODO is finished, then this block is all Windows-specific // Once the above TODO is finished, then this block is all Windows-specific
// files. // files.
...@@ -539,17 +539,11 @@ void BrowserRenderProcessHost::WidgetHidden() { ...@@ -539,17 +539,11 @@ void BrowserRenderProcessHost::WidgetHidden() {
} }
void BrowserRenderProcessHost::AddWord(const std::wstring& word) { void BrowserRenderProcessHost::AddWord(const std::wstring& word) {
#if !defined(OS_WIN)
// TODO(port): reimplement when we get the spell checker up and running on
// other platforms.
NOTIMPLEMENTED();
#else
base::Thread* io_thread = g_browser_process->io_thread(); base::Thread* io_thread = g_browser_process->io_thread();
if (profile()->GetSpellChecker()) { if (profile()->GetSpellChecker()) {
io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
profile()->GetSpellChecker(), &SpellChecker::AddWord, word)); profile()->GetSpellChecker(), &SpellChecker::AddWord, word));
} }
#endif // !defined(OS_WIN)
} }
void BrowserRenderProcessHost::AddVisitedLinks( void BrowserRenderProcessHost::AddVisitedLinks(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment