summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorsidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-10 22:32:21 +0000
committersidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-10 22:32:21 +0000
commit26ea6c409fedeabdabb53f41fcc80b79d2575cf9 (patch)
tree462cc525d12f6cebe47b60094aa5a346e46a92fd /chrome/renderer
parentfda8974e0a1daa704be0dc33fe04ae4564310c12 (diff)
downloadchromium_src-26ea6c409fedeabdabb53f41fcc80b79d2575cf9.zip
chromium_src-26ea6c409fedeabdabb53f41fcc80b79d2575cf9.tar.gz
chromium_src-26ea6c409fedeabdabb53f41fcc80b79d2575cf9.tar.bz2
Stop auto-correcting abbreviations.BUG= www.crbug.com/12921TEST= For command line --auto-spell-correct, "IMB" should not change to "IBM"
Review URL: http://codereview.chromium.org/119210 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc7
-rw-r--r--chrome/renderer/render_view.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 557bc0d..d5db96e 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2165,13 +2165,16 @@ void RenderView::SpellCheck(const std::wstring& word, int& misspell_location,
&misspell_length));
}
-void RenderView::GetAutoCorrectWord(const std::wstring& misspelled_word,
- std::wstring& autocorrect_word) {
+std::wstring RenderView::GetAutoCorrectWord(
+ const std::wstring& misspelled_word) {
+ std::wstring autocorrect_word;
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kAutoSpellCorrect)) {
Send(new ViewHostMsg_GetAutoCorrectWord(routing_id_, misspelled_word,
&autocorrect_word));
}
+
+ return autocorrect_word;
}
void RenderView::SetInputMethodState(bool enabled) {
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index a1928ba..a0dd47a 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -312,8 +312,7 @@ class RenderView : public RenderWidget,
virtual void FocusAccessibilityObject(WebCore::AccessibilityObject* acc_obj);
virtual void SpellCheck(const std::wstring& word, int& misspell_location,
int& misspell_length);
- virtual void GetAutoCorrectWord(const std::wstring& misspelled_word,
- std::wstring& autocorrect_word);
+ virtual std::wstring GetAutoCorrectWord(const std::wstring& word);
virtual void SetInputMethodState(bool enabled);
virtual void ScriptedPrint(WebFrame* frame);
virtual void WebInspectorOpened(int num_resources);