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

Unified Diff: chrome/browser/profile.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/browser/profile.h
===================================================================
--- chrome/browser/profile.h (revision 31117)
+++ chrome/browser/profile.h (working copy)
@@ -14,6 +14,9 @@
#include "base/file_path.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
+#if defined(SPELLCHECKER_IN_RENDERER)
+#include "chrome/browser/spellcheck_host.h"
+#endif
#include "chrome/browser/web_resource/web_resource_service.h"
#include "chrome/common/notification_registrar.h"
@@ -347,6 +350,16 @@
// memory.
virtual void DeleteSpellChecker() = 0;
+#if defined(SPELLCHECKER_IN_RENDERER)
+ // May return NULL.
+ virtual SpellCheckHost* GetSpellCheckHost() = 0;
+
+ // If |force| is false, and the spellchecker is already initialized (or is in
+ // the process of initializing), then do nothing. Otherwise clobber the
+ // current spellchecker and replace it with a new one.
+ virtual void ReinitializeSpellCheckHost(bool force) = 0;
+#endif
+
// Returns the WebKitContext assigned to this profile.
virtual WebKitContext* GetWebKitContext() = 0;
@@ -390,6 +403,9 @@
// The default profile implementation.
class ProfileImpl : public Profile,
+#if defined(SPELLCHECKER_IN_RENDERER)
+ public SpellCheckHost::Observer,
+#endif
public NotificationObserver {
public:
virtual ~ProfileImpl();
@@ -449,6 +465,10 @@
virtual void ReinitializeSpellChecker();
virtual SpellChecker* GetSpellChecker();
virtual void DeleteSpellChecker() { DeleteSpellCheckerImpl(true); }
+#if defined(SPELLCHECKER_IN_RENDERER)
+ virtual SpellCheckHost* GetSpellCheckHost();
+ virtual void ReinitializeSpellCheckHost(bool force);
+#endif
virtual WebKitContext* GetWebKitContext();
virtual DesktopNotificationService* GetDesktopNotificationService();
virtual void MarkAsCleanShutdown();
@@ -462,6 +482,11 @@
const NotificationSource& source,
const NotificationDetails& details);
+#if defined(SPELLCHECKER_IN_RENDERER)
+ // SpellCheckHost::Observer implementation.
+ virtual void SpellCheckHostInitialized();
+#endif
+
private:
friend class Profile;
@@ -552,6 +577,14 @@
// thread.
SpellChecker* spellchecker_;
+#if defined(SPELLCHECKER_IN_RENDERER)
+ scoped_refptr<SpellCheckHost> spellcheck_host_;
+
+ // Indicates whether |spellcheck_host_| has told us initialization is
+ // finished.
+ bool spellcheck_host_ready_;
+#endif
+
// Set to true when ShutdownSessionService is invoked. If true
// GetSessionService won't recreate the SessionService.
bool shutdown_session_service_;

Powered by Google App Engine
This is Rietveld 408576698