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

Unified Diff: chrome/browser/profiles/profile_impl.cc

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/chrome_content_browser_client.cc ('k') | chrome/browser/spellcheck_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 83517)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -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 @@
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 @@
*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);
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/spellcheck_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698