diff options
-rw-r--r-- | chrome/browser/gtk/options/languages_page_gtk.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/options/languages_page_view.cc | 6 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 11 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 2 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 2 |
6 files changed, 16 insertions, 9 deletions
diff --git a/chrome/browser/gtk/options/languages_page_gtk.cc b/chrome/browser/gtk/options/languages_page_gtk.cc index 3c734bd..dfea04a 100644 --- a/chrome/browser/gtk/options/languages_page_gtk.cc +++ b/chrome/browser/gtk/options/languages_page_gtk.cc @@ -235,7 +235,7 @@ void LanguagesPageGtk::Init() { FALSE, FALSE, 0); const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - if (command_line.HasSwitch(switches::kAutoSpellCorrect)) { + if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) { enable_autospellcorrect_checkbox_ = gtk_check_button_new_with_label( l10n_util::GetStringUTF8( IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION).c_str()); diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 4209774..b4b2824 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -512,7 +512,7 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer( switches::kSilentDumpOnDCHECK, switches::kUseLowFragHeapCrt, switches::kEnableStatsTable, - switches::kAutoSpellCorrect, + switches::kExperimentalSpellcheckerFeatures, switches::kDisableAudio, switches::kSimpleDataSource, switches::kEnableBenchmarking, diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc index b1c2ee7..b2eac08 100644 --- a/chrome/browser/views/options/languages_page_view.cc +++ b/chrome/browser/views/options/languages_page_view.cc @@ -340,7 +340,7 @@ void LanguagesPageView::InitControlLayout() { enable_spellchecking_checkbox_ = new views::Checkbox( l10n_util::GetString(IDS_OPTIONS_ENABLE_SPELLCHECK)); const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - if (command_line.HasSwitch(switches::kAutoSpellCorrect)) { + if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) { enable_autospellcorrect_checkbox_ = new views::Checkbox( l10n_util::GetString(IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION)); enable_autospellcorrect_checkbox_->set_listener(this); @@ -361,7 +361,7 @@ void LanguagesPageView::InitControlLayout() { layout->StartRow(0, single_column_view_set_id); layout->AddView(enable_spellchecking_checkbox_); layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); - if (command_line.HasSwitch(switches::kAutoSpellCorrect)) { + if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) { layout->StartRow(0, single_column_view_set_id); layout->AddView(enable_autospellcorrect_checkbox_); layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); @@ -446,7 +446,7 @@ void LanguagesPageView::NotifyPrefChanged(const std::wstring* pref_name) { } if (!pref_name || *pref_name == prefs::kEnableAutoSpellCorrect) { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - if (command_line.HasSwitch(switches::kAutoSpellCorrect)) { + if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) { enable_autospellcorrect_checkbox_->SetChecked( enable_autospellcorrect_.GetValue()); } diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 913d895..d38ee2e 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -465,8 +465,15 @@ const wchar_t kWebWorkerShareProcesses[] = L"web-worker-share-processes"; // Enables the bookmark menu. const wchar_t kBookmarkMenu[] = L"bookmark-menu"; -// Enables auto spell correction. -const wchar_t kAutoSpellCorrect[] = L"auto-spell-correct"; +// Enables experimental features for Spellchecker. Right now, the first +// experimental feature is auto spell correct, which corrects words which are +// misppelled by typing the word with two consecutive letters swapped. The +// features that will be added next are: +// 1 - Allow multiple spellcheckers to work simultaneously. +// 2 - Allow automatic detection of spell check language. +// TODO(sidchat): Implement the above fetaures to work under this flag. +const wchar_t kExperimentalSpellcheckerFeatures[] = + L"experimental-spellchecker-features"; // Enables StatsTable, logging statistics to a global named shared memory table. const wchar_t kEnableStatsTable[] = L"enable-stats-table"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 802532f..fb9a761 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -178,7 +178,7 @@ extern const wchar_t kBookmarkMenu[]; extern const wchar_t kEnableStatsTable[]; -extern const wchar_t kAutoSpellCorrect[]; +extern const wchar_t kExperimentalSpellcheckerFeatures[]; extern const wchar_t kDisableAudio[]; extern const wchar_t kSimpleDataSource[]; diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index bcbda08..6888fbb 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1541,7 +1541,7 @@ void RenderView::spellCheck( WebString RenderView::autoCorrectWord(const WebKit::WebString& word) { std::wstring autocorrect_word; const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - if (command_line.HasSwitch(switches::kAutoSpellCorrect)) { + if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) { EnsureDocumentTag(); Send(new ViewHostMsg_GetAutoCorrectWord( routing_id_, UTF16ToWideHack(word), document_tag_, &autocorrect_word)); |