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

Side by Side Diff: components/spellcheck/renderer/spellcheck_provider.cc

Issue 2235333004: ABANDONED CL: No advance-to-next-misspelling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 4 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
« 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/spellcheck/renderer/spellcheck_provider.h" 5 #include "components/spellcheck/renderer/spellcheck_provider.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "components/spellcheck/common/spellcheck_marker.h" 9 #include "components/spellcheck/common/spellcheck_marker.h"
10 #include "components/spellcheck/common/spellcheck_messages.h" 10 #include "components/spellcheck/common/spellcheck_messages.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 U16_NEXT(data, index, length, code); 228 U16_NEXT(data, index, length, code);
229 UErrorCode error = U_ZERO_ERROR; 229 UErrorCode error = U_ZERO_ERROR;
230 if (uscript_getScript(code, &error) != USCRIPT_COMMON) 230 if (uscript_getScript(code, &error) != USCRIPT_COMMON)
231 return true; 231 return true;
232 } 232 }
233 return false; 233 return false;
234 } 234 }
235 235
236 #if defined(USE_BROWSER_SPELLCHECKER) 236 #if defined(USE_BROWSER_SPELLCHECKER)
237 void SpellCheckProvider::OnAdvanceToNextMisspelling() { 237 void SpellCheckProvider::OnAdvanceToNextMisspelling() {
238 if (!render_view()->GetWebView())
239 return;
240 render_view()->GetWebView()->focusedFrame()->executeCommand(
241 WebString::fromUTF8("AdvanceToNextMisspelling"));
242 } 238 }
243 239
244 void SpellCheckProvider::OnRespondTextCheck( 240 void SpellCheckProvider::OnRespondTextCheck(
245 int identifier, 241 int identifier,
246 const base::string16& line, 242 const base::string16& line,
247 const std::vector<SpellCheckResult>& results) { 243 const std::vector<SpellCheckResult>& results) {
248 // TODO(groby): Unify with SpellCheckProvider::OnRespondSpellingService 244 // TODO(groby): Unify with SpellCheckProvider::OnRespondSpellingService
249 DCHECK(spellcheck_); 245 DCHECK(spellcheck_);
250 WebTextCheckingCompletion* completion = 246 WebTextCheckingCompletion* completion =
251 text_check_completions_.Lookup(identifier); 247 text_check_completions_.Lookup(identifier);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return true; 337 return true;
342 } 338 }
343 } 339 }
344 340
345 return false; 341 return false;
346 } 342 }
347 343
348 void SpellCheckProvider::OnDestruct() { 344 void SpellCheckProvider::OnDestruct() {
349 delete this; 345 delete this;
350 } 346 }
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