OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |