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

Unified Diff: chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm

Issue 222783004: Move textual replacement to WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
index 6a2efbf2332a4684dd829ddd2926677c9c0e1763..a6b260fbd4a75905f18e445f9faf1c151f3e5931 100644
--- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
+++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
@@ -218,7 +218,10 @@ class SpellCheckObserver : public content::WebContentsObserver {
// that we want to replace the selected word in the text with.
NSString* newWord = [[sender selectedCell] stringValue];
if (newWord != nil) {
- renderWidgetHost_->Replace(base::SysNSStringToUTF16(newWord));
+ content::WebContents* webContents =
+ content::WebContents::FromRenderViewHost(
+ RenderViewHost::From(renderWidgetHost_));
+ webContents->Replace(base::SysNSStringToUTF16(newWord));
}
}

Powered by Google App Engine
This is Rietveld 408576698