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

Side by Side Diff: content/shell/renderer/test_runner/SpellCheckClient.h

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SpellCheckClient_h
6 #define SpellCheckClient_h
7
8 #include "content/shell/renderer/test_runner/MockSpellCheck.h"
9 #include "content/shell/renderer/test_runner/WebTask.h"
10 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
11 #include "third_party/WebKit/public/web/WebSpellCheckClient.h"
12
13 namespace WebTestRunner {
14
15 class WebTestDelegate;
16 class WebTestProxyBase;
17
18 class SpellCheckClient : public blink::WebSpellCheckClient, public blink::WebNon Copyable {
19 public:
20 explicit SpellCheckClient(WebTestProxyBase*);
21 virtual ~SpellCheckClient();
22
23 void setDelegate(WebTestDelegate*);
24
25 WebTaskList* taskList() { return &m_taskList; }
26 MockSpellCheck* mockSpellCheck() { return &m_spellcheck; }
27
28 // blink::WebSpellCheckClient implementation.
29 virtual void spellCheck(const blink::WebString&, int& offset, int& length, b link::WebVector<blink::WebString>* optionalSuggestions);
30 virtual void checkTextOfParagraph(const blink::WebString&, blink::WebTextChe ckingTypeMask, blink::WebVector<blink::WebTextCheckingResult>*);
31 virtual void requestCheckingOfText(const blink::WebString&,
32 const blink::WebVector<uint32_t>&,
33 const blink::WebVector<unsigned>&,
34 blink::WebTextCheckingCompletion*);
35 virtual blink::WebString autoCorrectWord(const blink::WebString&);
36
37 private:
38 void finishLastTextCheck();
39
40 // The mock spellchecker used in spellCheck().
41 MockSpellCheck m_spellcheck;
42
43 blink::WebString m_lastRequestedTextCheckString;
44 blink::WebTextCheckingCompletion* m_lastRequestedTextCheckingCompletion;
45
46 WebTaskList m_taskList;
47
48 WebTestDelegate* m_delegate;
49
50 WebTestProxyBase* m_webTestProxy;
51 };
52
53 }
54
55 #endif // SpellCheckClient_h
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/OWNERS ('k') | content/shell/renderer/test_runner/SpellCheckClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698