diff options
author | sidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 19:30:21 +0000 |
---|---|---|
committer | sidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 19:30:21 +0000 |
commit | eda2b5a29df212809fb3ee5a8e8c42017b635f1c (patch) | |
tree | e0b9116beca023c3400cee5e28baa7114dee9cd2 /chrome/renderer | |
parent | 01804b55e214f78aec2618b811a5ffa7079104dd (diff) | |
download | chromium_src-eda2b5a29df212809fb3ee5a8e8c42017b635f1c.zip chromium_src-eda2b5a29df212809fb3ee5a8e8c42017b635f1c.tar.gz chromium_src-eda2b5a29df212809fb3ee5a8e8c42017b635f1c.tar.bz2 |
Add Automatic spell correction support in Chrome.
Issue=7624
Review URL: http://codereview.chromium.org/42608
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_view.cc | 9 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 99e662b..979f74f 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -2298,6 +2298,15 @@ void RenderView::SpellCheck(const std::wstring& word, int& misspell_location, &misspell_length)); } +void 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)); + } +} + void RenderView::SetInputMethodState(bool enabled) { // Save the updated IME status and mark the input focus has been updated. // The IME status is to be sent to a browser process next time when diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 7b5665d..a993327 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -309,6 +309,8 @@ class RenderView : public RenderWidget, virtual bool WasOpenedByUserGesture() const; 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 void SetInputMethodState(bool enabled); virtual void ScriptedPrint(WebFrame* frame); virtual void WebInspectorOpened(int num_resources); |