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

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

Issue 553103: Spellchecker: fix render view auto-suggest context menu items... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 10 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 | « no previous file | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 routing_id_, frame->url(), UTF16ToWideHack(message), &success, 1701 routing_id_, frame->url(), UTF16ToWideHack(message), &success,
1702 &ignored_result)); 1702 &ignored_result));
1703 return success; 1703 return success;
1704 } 1704 }
1705 1705
1706 void RenderView::showContextMenu( 1706 void RenderView::showContextMenu(
1707 WebFrame* frame, const WebContextMenuData& data) { 1707 WebFrame* frame, const WebContextMenuData& data) {
1708 ContextMenuParams params = ContextMenuParams(data); 1708 ContextMenuParams params = ContextMenuParams(data);
1709 if (!params.misspelled_word.empty() && RenderThread::current()) { 1709 if (!params.misspelled_word.empty() && RenderThread::current()) {
1710 int misspelled_offset, misspelled_length; 1710 int misspelled_offset, misspelled_length;
1711 bool misspelled = RenderThread::current()->spellchecker()->SpellCheckWord( 1711 bool spelled_right = RenderThread::current()->spellchecker()->SpellCheckWord (
Evan Martin 2010/01/26 22:36:00 80
1712 params.misspelled_word.c_str(), params.misspelled_word.size(), 1712 params.misspelled_word.c_str(), params.misspelled_word.size(),
1713 document_tag_, 1713 document_tag_,
1714 &misspelled_offset, &misspelled_length, 1714 &misspelled_offset, &misspelled_length,
1715 &params.dictionary_suggestions); 1715 &params.dictionary_suggestions);
1716 if (!misspelled) 1716 if (spelled_right)
1717 params.misspelled_word.clear(); 1717 params.misspelled_word.clear();
1718 } 1718 }
1719 1719
1720 Send(new ViewHostMsg_ContextMenu(routing_id_, params)); 1720 Send(new ViewHostMsg_ContextMenu(routing_id_, params));
1721 } 1721 }
1722 1722
1723 void RenderView::setStatusText(const WebString& text) { 1723 void RenderView::setStatusText(const WebString& text) {
1724 } 1724 }
1725 1725
1726 void RenderView::UpdateTargetURL(const GURL& url, const GURL& fallback_url) { 1726 void RenderView::UpdateTargetURL(const GURL& url, const GURL& fallback_url) {
(...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after
4031 new PluginMsg_SignalModalDialogEvent(host_window_)); 4031 new PluginMsg_SignalModalDialogEvent(host_window_));
4032 4032
4033 message->EnableMessagePumping(); // Runs a nested message loop. 4033 message->EnableMessagePumping(); // Runs a nested message loop.
4034 bool rv = Send(message); 4034 bool rv = Send(message);
4035 4035
4036 PluginChannelHost::Broadcast( 4036 PluginChannelHost::Broadcast(
4037 new PluginMsg_ResetModalDialogEvent(host_window_)); 4037 new PluginMsg_ResetModalDialogEvent(host_window_));
4038 4038
4039 return rv; 4039 return rv;
4040 } 4040 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698