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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 260006: [chrome-reviews] Change flag "auto-spell-correct" to "advanced-spellchecker". I will be making... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 const WebString& text, int& misspelled_offset, int& misspelled_length) { 1529 const WebString& text, int& misspelled_offset, int& misspelled_length) {
1530 EnsureDocumentTag(); 1530 EnsureDocumentTag();
1531 Send(new ViewHostMsg_SpellCheck( 1531 Send(new ViewHostMsg_SpellCheck(
1532 routing_id_, UTF16ToWideHack(text), document_tag_, 1532 routing_id_, UTF16ToWideHack(text), document_tag_,
1533 &misspelled_offset, &misspelled_length)); 1533 &misspelled_offset, &misspelled_length));
1534 } 1534 }
1535 1535
1536 WebString RenderView::autoCorrectWord(const WebKit::WebString& word) { 1536 WebString RenderView::autoCorrectWord(const WebKit::WebString& word) {
1537 std::wstring autocorrect_word; 1537 std::wstring autocorrect_word;
1538 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 1538 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
1539 if (command_line.HasSwitch(switches::kAutoSpellCorrect)) { 1539 if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) {
1540 EnsureDocumentTag(); 1540 EnsureDocumentTag();
1541 Send(new ViewHostMsg_GetAutoCorrectWord( 1541 Send(new ViewHostMsg_GetAutoCorrectWord(
1542 routing_id_, UTF16ToWideHack(word), document_tag_, &autocorrect_word)); 1542 routing_id_, UTF16ToWideHack(word), document_tag_, &autocorrect_word));
1543 } 1543 }
1544 return WideToUTF16Hack(autocorrect_word); 1544 return WideToUTF16Hack(autocorrect_word);
1545 } 1545 }
1546 1546
1547 void RenderView::updateSpellingUIWithMisspelledWord(const WebString& word) { 1547 void RenderView::updateSpellingUIWithMisspelledWord(const WebString& word) {
1548 Send(new ViewHostMsg_UpdateSpellingPanelWithMisspelledWord( 1548 Send(new ViewHostMsg_UpdateSpellingPanelWithMisspelledWord(
1549 routing_id_, UTF16ToWideHack(word))); 1549 routing_id_, UTF16ToWideHack(word)));
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after
3610 new PluginMsg_SignalModalDialogEvent(host_window_)); 3610 new PluginMsg_SignalModalDialogEvent(host_window_));
3611 3611
3612 message->EnableMessagePumping(); // Runs a nested message loop. 3612 message->EnableMessagePumping(); // Runs a nested message loop.
3613 bool rv = Send(message); 3613 bool rv = Send(message);
3614 3614
3615 PluginChannelHost::Broadcast( 3615 PluginChannelHost::Broadcast(
3616 new PluginMsg_ResetModalDialogEvent(host_window_)); 3616 new PluginMsg_ResetModalDialogEvent(host_window_));
3617 3617
3618 return rv; 3618 return rv;
3619 } 3619 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698