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

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

Issue 2791753003: Split WebTextCheckClient off WebSpellCheckClient (Closed)
Patch Set: Add TODOs for class renaming Created 3 years, 8 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
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_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "components/spellcheck/common/spellcheck_messages.h" 9 #include "components/spellcheck/common/spellcheck_messages.h"
10 #include "components/spellcheck/common/spellcheck_result.h" 10 #include "components/spellcheck/common/spellcheck_result.h"
(...skipping 26 matching lines...) Expand all
37 SpellCheckProvider::SpellCheckProvider( 37 SpellCheckProvider::SpellCheckProvider(
38 content::RenderView* render_view, 38 content::RenderView* render_view,
39 SpellCheck* spellcheck) 39 SpellCheck* spellcheck)
40 : content::RenderViewObserver(render_view), 40 : content::RenderViewObserver(render_view),
41 content::RenderViewObserverTracker<SpellCheckProvider>(render_view), 41 content::RenderViewObserverTracker<SpellCheckProvider>(render_view),
42 spelling_panel_visible_(false), 42 spelling_panel_visible_(false),
43 spellcheck_(spellcheck) { 43 spellcheck_(spellcheck) {
44 DCHECK(spellcheck_); 44 DCHECK(spellcheck_);
45 if (render_view) { // NULL in unit tests. 45 if (render_view) { // NULL in unit tests.
46 render_view->GetWebView()->setSpellCheckClient(this); 46 render_view->GetWebView()->setSpellCheckClient(this);
47 render_view->GetWebView()->setTextCheckClient(this);
47 EnableSpellcheck(spellcheck_->IsSpellcheckEnabled()); 48 EnableSpellcheck(spellcheck_->IsSpellcheckEnabled());
48 } 49 }
49 } 50 }
50 51
51 SpellCheckProvider::~SpellCheckProvider() { 52 SpellCheckProvider::~SpellCheckProvider() {
52 } 53 }
53 54
54 void SpellCheckProvider::RequestTextChecking( 55 void SpellCheckProvider::RequestTextChecking(
55 const base::string16& text, 56 const base::string16& text,
56 WebTextCheckingCompletion* completion) { 57 WebTextCheckingCompletion* completion) {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 completion->didFinishCheckingText(results); 319 completion->didFinishCheckingText(results);
319 return true; 320 return true;
320 } 321 }
321 322
322 return false; 323 return false;
323 } 324 }
324 325
325 void SpellCheckProvider::OnDestruct() { 326 void SpellCheckProvider::OnDestruct() {
326 delete this; 327 delete this;
327 } 328 }
OLDNEW
« no previous file with comments | « components/spellcheck/renderer/spellcheck_provider.h ('k') | content/shell/test_runner/spell_check_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698