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

Side by Side Diff: webkit/glue/webframe_impl.cc

Issue 13731: [chromium-reviews] Add "Enable spell check for this field" menu option in sub context menu for c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 } 1314 }
1315 1315
1316 void WebFrameImpl::Replace(const std::wstring& wtext) { 1316 void WebFrameImpl::Replace(const std::wstring& wtext) {
1317 String text = webkit_glue::StdWStringToString(wtext); 1317 String text = webkit_glue::StdWStringToString(wtext);
1318 RefPtr<DocumentFragment> fragment = 1318 RefPtr<DocumentFragment> fragment =
1319 createFragmentFromText(frame()->selection()->toRange().get(), text); 1319 createFragmentFromText(frame()->selection()->toRange().get(), text);
1320 WebCore::applyCommand(WebCore::ReplaceSelectionCommand::create( 1320 WebCore::applyCommand(WebCore::ReplaceSelectionCommand::create(
1321 frame()->document(), fragment.get(), false, true, true)); 1321 frame()->document(), fragment.get(), false, true, true));
1322 } 1322 }
1323 1323
1324 void WebFrameImpl::ToggleSpellCheck() {
1325 frame()->editor()->toggleContinuousSpellChecking();
1326 }
1327
1328 bool WebFrameImpl::SpellCheckEnabled() {
1329 return frame()->editor()->isContinuousSpellCheckingEnabled();
1330 }
1331
1324 void WebFrameImpl::Delete() { 1332 void WebFrameImpl::Delete() {
1325 frame()->editor()->command("Delete").execute(); 1333 frame()->editor()->command("Delete").execute();
1326 1334
1327 WebViewDelegate* d = GetView()->GetDelegate(); 1335 WebViewDelegate* d = GetView()->GetDelegate();
1328 if (d) 1336 if (d)
1329 d->UserMetricsRecordAction(L"DeleteSelection"); 1337 d->UserMetricsRecordAction(L"DeleteSelection");
1330 } 1338 }
1331 1339
1332 void WebFrameImpl::Undo() { 1340 void WebFrameImpl::Undo() {
1333 frame()->editor()->undo(); 1341 frame()->editor()->undo();
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 return password_listeners_.get(input_element); 1849 return password_listeners_.get(input_element);
1842 } 1850 }
1843 1851
1844 void WebFrameImpl::ClearPasswordListeners() { 1852 void WebFrameImpl::ClearPasswordListeners() {
1845 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); 1853 for (PasswordListenerMap::iterator iter = password_listeners_.begin();
1846 iter != password_listeners_.end(); ++iter) { 1854 iter != password_listeners_.end(); ++iter) {
1847 delete iter->second; 1855 delete iter->second;
1848 } 1856 }
1849 password_listeners_.clear(); 1857 password_listeners_.clear();
1850 } 1858 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698