summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 21:27:02 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 21:27:02 +0000
commitc47cfd6f1fc260b3bf5601994ac196571163e30b (patch)
tree8e6029904b6a9f94a581c8d3dfe255b718651a6e /chrome/browser/profiles
parent20e3f034488762cf4438e73867911754adb6634a (diff)
downloadchromium_src-c47cfd6f1fc260b3bf5601994ac196571163e30b.zip
chromium_src-c47cfd6f1fc260b3bf5601994ac196571163e30b.tar.gz
chromium_src-c47cfd6f1fc260b3bf5601994ac196571163e30b.tar.bz2
Move code that talks to spellchecking out of content.
Review URL: http://codereview.chromium.org/6880320 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles')
-rw-r--r--chrome/browser/profiles/profile_impl.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index b4cccce..b665f9e 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -83,6 +83,7 @@
#include "chrome/common/json_pref_store.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
+#include "chrome/common/spellcheck_messages.h"
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/browser_thread.h"
#include "content/browser/chrome_blob_storage_context.h"
@@ -1254,10 +1255,7 @@ void ProfileImpl::SpellCheckHostInitialized() {
spellcheck_host_ready_ = spellcheck_host_ &&
(spellcheck_host_->GetDictionaryFile() !=
base::kInvalidPlatformFileValue ||
- spellcheck_host_->IsUsingPlatformChecker());
- NotificationService::current()->Notify(
- NotificationType::SPELLCHECK_HOST_REINITIALIZED,
- Source<Profile>(this), NotificationService::NoDetails());
+ spellcheck_host_->IsUsingPlatformChecker());;
}
ExtensionPrefValueMap* ProfileImpl::GetExtensionPrefValueMap() {
@@ -1297,9 +1295,12 @@ void ProfileImpl::Observe(NotificationType type,
*pref_name_in == prefs::kEnableSpellCheck) {
ReinitializeSpellCheckHost(true);
} else if (*pref_name_in == prefs::kEnableAutoSpellCorrect) {
- NotificationService::current()->Notify(
- NotificationType::SPELLCHECK_AUTOSPELL_TOGGLED,
- Source<Profile>(this), NotificationService::NoDetails());
+ bool enabled = prefs->GetBoolean(prefs::kEnableAutoSpellCorrect);
+ for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ !i.IsAtEnd(); i.Advance()) {
+ RenderProcessHost* process = i.GetCurrentValue();
+ process->Send(new SpellCheckMsg_EnableAutoSpellCorrect(enabled));
+ }
} else if (*pref_name_in == prefs::kClearSiteDataOnExit) {
clear_local_state_on_exit_ =
prefs->GetBoolean(prefs::kClearSiteDataOnExit);