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

Unified Diff: chrome/browser/tab_contents/spelling_menu_observer.cc

Issue 9368052: Removed WebTextCheckingResult legacy API use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another trial... Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/spelling_menu_observer.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/spelling_menu_observer.cc
diff --git a/chrome/browser/tab_contents/spelling_menu_observer.cc b/chrome/browser/tab_contents/spelling_menu_observer.cc
index e38828077499ebdddd26592a1e3edfc2c4b33291..71cd650b42b6fe15b555cbd92543ff2ce242059f 100644
--- a/chrome/browser/tab_contents/spelling_menu_observer.cc
+++ b/chrome/browser/tab_contents/spelling_menu_observer.cc
@@ -18,11 +18,11 @@
#include "chrome/browser/tab_contents/spelling_bubble_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/spellcheck_result.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/public/common/context_menu_params.h"
#include "grit/generated_resources.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCheckingResult.h"
#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
@@ -240,7 +240,7 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) {
void SpellingMenuObserver::OnTextCheckComplete(
int tag,
- const std::vector<WebKit::WebTextCheckingResult>& results) {
+ const std::vector<SpellCheckResult>& results) {
animation_timer_.Stop();
// Scan the text-check results and replace the misspelled regions with
@@ -251,10 +251,10 @@ void SpellingMenuObserver::OnTextCheckComplete(
if (results.empty()) {
succeeded_ = false;
} else {
- typedef std::vector<WebKit::WebTextCheckingResult> WebTextCheckingResults;
- for (WebTextCheckingResults::const_iterator it = results.begin();
+ typedef std::vector<SpellCheckResult> SpellCheckResults;
+ for (SpellCheckResults::const_iterator it = results.begin();
it != results.end(); ++it) {
- result_.replace(it->position, it->length, it->replacement);
+ result_.replace(it->location, it->length, it->replacement);
}
for (std::vector<string16>::const_iterator it = suggestions_.begin();
it != suggestions_.end(); ++it) {
« no previous file with comments | « chrome/browser/tab_contents/spelling_menu_observer.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698