summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.h
diff options
context:
space:
mode:
authorsidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-15 19:30:41 +0000
committersidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-15 19:30:41 +0000
commit209308572c06cc9d0a7c38e37928d6765ef9f4c7 (patch)
tree294a02a68af2475e624e7a8490525c7198ac521f /chrome/browser/profile.h
parentece541a4d861b2fd0d83ea32dec75d233e217d5c (diff)
downloadchromium_src-209308572c06cc9d0a7c38e37928d6765ef9f4c7.zip
chromium_src-209308572c06cc9d0a7c38e37928d6765ef9f4c7.tar.gz
chromium_src-209308572c06cc9d0a7c38e37928d6765ef9f4c7.tar.bz2
Change SpellChecker language without restarting the browser.
Review URL: http://codereview.chromium.org/7056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.h')
-rw-r--r--chrome/browser/profile.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h
index 09b0baf..2edc40c 100644
--- a/chrome/browser/profile.h
+++ b/chrome/browser/profile.h
@@ -194,6 +194,13 @@ class Profile {
virtual void ResetTabRestoreService() = 0;
+ // Initializes the spellchecker. If the spellchecker already exsts, then
+ // it is released, and initialized again. This model makes sure that
+ // spellchecker language can be changed without restarting the browser.
+ // NOTE: This is being currently called in the UI thread, which is OK as long
+ // as the spellchecker object is USED in the IO thread.
+ virtual void InitializeSpellChecker() = 0;
+
// Returns the spell checker object for this profile. THIS OBJECT MUST ONLY
// BE USED ON THE I/O THREAD! This pointer is retrieved from the profile and
// sent to the I/O thread where it is actually used.
@@ -203,8 +210,7 @@ class Profile {
//
// NOTE: this is invoked internally on a normal shutdown, but is public so
// that it can be invoked when the user logs out/powers down (WM_ENDSESSION).
- virtual void MarkAsCleanShutdown() = 0;
-
+ virtual void MarkAsCleanShutdown() = 0;
#ifdef UNIT_TEST
// Use with caution. GetDefaultRequestContext may be called on any thread!
static void set_default_request_context(URLRequestContext* c) {
@@ -250,6 +256,7 @@ class ProfileImpl : public Profile {
virtual Time GetStartTime() const;
virtual TabRestoreService* GetTabRestoreService();
virtual void ResetTabRestoreService();
+ virtual void InitializeSpellChecker();
virtual SpellChecker* GetSpellChecker();
virtual void MarkAsCleanShutdown();
#ifdef CHROME_PERSONALIZATION
@@ -316,5 +323,12 @@ class ProfileImpl : public Profile {
DISALLOW_EVIL_CONSTRUCTORS(ProfileImpl);
};
+// This struct is used to pass the spellchecker object through the notification
+// NOTIFY_SPELLCHECKER_REINITIALIZED. This is used as the details for the
+// notification service.
+struct SpellcheckerReinitializedDetails {
+ scoped_refptr<SpellChecker> spellchecker;
+};
+
#endif // CHROME_BROWSER_PROFILE_H__