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

Unified Diff: chrome/browser/spellcheck_host_impl.h

Issue 6880320: Move code that talks to spellchecking out of content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months 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/spellcheck_host.h ('k') | chrome/browser/spellcheck_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellcheck_host_impl.h
===================================================================
--- chrome/browser/spellcheck_host_impl.h (revision 83517)
+++ chrome/browser/spellcheck_host_impl.h (working copy)
@@ -14,6 +14,8 @@
#include "chrome/browser/spellcheck_host.h"
#include "chrome/browser/spellcheck_host_observer.h"
#include "chrome/common/net/url_fetcher.h"
+#include "content/common/notification_observer.h"
+#include "content/common/notification_registrar.h"
// This class implements the SpellCheckHost interface to provide the
// functionalities listed below:
@@ -36,7 +38,8 @@
// Available languages for the checker, which we need to specify via Create(),
// can be listed using SpellCheckHost::GetAvailableLanguages() static method.
class SpellCheckHostImpl : public SpellCheckHost,
- public URLFetcher::Delegate {
+ public URLFetcher::Delegate,
+ public NotificationObserver {
public:
SpellCheckHostImpl(SpellCheckHostObserver* observer,
const std::string& language,
@@ -45,19 +48,13 @@
void Initialize();
// SpellCheckHost implementation
-
virtual void UnsetObserver();
-
+ virtual void InitForRenderer(RenderProcessHost* process);
virtual void AddWord(const std::string& word);
-
virtual const base::PlatformFile& GetDictionaryFile() const;
-
virtual const std::vector<std::string>& GetCustomWords() const;
-
virtual const std::string& GetLastAddedFile() const;
-
virtual const std::string& GetLanguage() const;
-
virtual bool IsUsingPlatformChecker() const;
private:
@@ -99,6 +96,11 @@
const ResponseCookies& cookies,
const std::string& data);
+ // NotificationObserver implementation.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
// Saves |data_| to disk. Run on the file thread.
void SaveDictionaryData();
@@ -136,6 +138,8 @@
// Used for downloading the dictionary file.
scoped_ptr<URLFetcher> fetcher_;
+
+ NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_SPELLCHECK_HOST_IMPL_H_
« no previous file with comments | « chrome/browser/spellcheck_host.h ('k') | chrome/browser/spellcheck_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698