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

Unified Diff: chrome/renderer/render_thread.h

Issue 357003: Move the spellchecker to the renderer.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rename 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
Index: chrome/renderer/render_thread.h
===================================================================
--- chrome/renderer/render_thread.h (revision 31117)
+++ chrome/renderer/render_thread.h (working copy)
@@ -10,6 +10,7 @@
#include "app/gfx/native_widget_types.h"
#include "base/shared_memory.h"
+#include "base/string16.h"
#include "base/task.h"
#include "build/build_config.h"
#include "chrome/common/child_thread.h"
@@ -28,6 +29,7 @@
class RendererHistogram;
class RendererWebDatabaseObserver;
class RendererWebKitClientImpl;
+class SpellCheck;
class SkBitmap;
class SocketStreamDispatcher;
class UserScriptSlave;
@@ -121,6 +123,12 @@
return socket_stream_dispatcher_.get();
}
+#if defined(SPELLCHECKER_IN_RENDERER)
+ SpellCheck* spellchecker() const {
+ return spellchecker_.get();
+ }
+#endif
+
bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; }
// Do DNS prefetch resolution of a hostname.
@@ -139,6 +147,11 @@
// Sends a message to the browser to enable or disable the disk cache.
void SetCacheMode(bool enabled);
+#if defined(SPELLCHECKER_IN_RENDERER)
+ // Send a message to the browser to request a spellcheck dictionary.
+ void RequestSpellCheckDictionary();
+#endif
+
private:
virtual void OnControlMessageReceived(const IPC::Message& msg);
@@ -185,6 +198,15 @@
void OnPurgeMemory();
void OnPurgePluginListCache(bool reload_pages);
+#if defined(SPELLCHECKER_IN_RENDERER)
+ void OnInitSpellChecker(const base::FileDescriptor& bdict_fd,
+ const std::vector<std::string>& custom_words,
+ const std::string& language,
+ bool auto_spell_correct);
+ void OnSpellCheckWordAdded(const std::string& word);
+ void OnSpellCheckEnableAutoSpellCorrect(bool enable);
+#endif
+
// Gather usage statistics from the in-memory cache and inform our host.
// These functions should be call periodically so that the host can make
// decisions about how to allocation resources using current information.
@@ -208,6 +230,9 @@
scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_;
scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_;
scoped_ptr<RendererWebDatabaseObserver> renderer_web_database_observer_;
+#if defined(SPELLCHECKER_IN_RENDERER)
+ scoped_ptr<SpellCheck> spellchecker_;
+#endif
// Used on the renderer and IPC threads.
scoped_refptr<DBMessageFilter> db_message_filter_;

Powered by Google App Engine
This is Rietveld 408576698