OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_SHELL_TEST_RUNNER_SPELL_CHECK_CLIENT_H_ | 5 #ifndef CONTENT_SHELL_TEST_RUNNER_SPELL_CHECK_CLIENT_H_ |
6 #define CONTENT_SHELL_TEST_RUNNER_SPELL_CHECK_CLIENT_H_ | 6 #define CONTENT_SHELL_TEST_RUNNER_SPELL_CHECK_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "content/shell/test_runner/mock_spell_check.h" | 12 #include "content/shell/test_runner/mock_spell_check.h" |
13 #include "third_party/WebKit/public/platform/WebString.h" | 13 #include "third_party/WebKit/public/platform/WebString.h" |
14 #include "third_party/WebKit/public/platform/WebVector.h" | 14 #include "third_party/WebKit/public/platform/WebVector.h" |
15 #include "third_party/WebKit/public/web/WebSpellCheckClient.h" | 15 #include "third_party/WebKit/public/web/WebTextCheckClient.h" |
16 #include "v8/include/v8.h" | 16 #include "v8/include/v8.h" |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 class WebTextCheckingCompletion; | 19 class WebTextCheckingCompletion; |
20 } // namespace blink | 20 } // namespace blink |
21 | 21 |
22 namespace test_runner { | 22 namespace test_runner { |
23 | 23 |
24 class TestRunner; | 24 class TestRunner; |
25 class WebTestDelegate; | 25 class WebTestDelegate; |
26 | 26 |
27 class SpellCheckClient : public blink::WebSpellCheckClient { | 27 class SpellCheckClient : public blink::WebTextCheckClient { |
28 public: | 28 public: |
29 explicit SpellCheckClient(TestRunner* test_runner); | 29 explicit SpellCheckClient(TestRunner* test_runner); |
30 virtual ~SpellCheckClient(); | 30 ~SpellCheckClient() override; |
31 | 31 |
32 void SetDelegate(WebTestDelegate* delegate); | 32 void SetDelegate(WebTestDelegate* delegate); |
33 void SetEnabled(bool enabled); | 33 void SetEnabled(bool enabled); |
34 | 34 |
35 // Sets a callback that will be invoked after each request is revoled. | 35 // Sets a callback that will be invoked after each request is revoled. |
36 void SetSpellCheckResolvedCallback(v8::Local<v8::Function> callback); | 36 void SetSpellCheckResolvedCallback(v8::Local<v8::Function> callback); |
37 | 37 |
38 // Remove the above callback. Beware: don't call it inside the callback. | 38 // Remove the above callback. Beware: don't call it inside the callback. |
39 void RemoveSpellCheckResolvedCallback(); | 39 void RemoveSpellCheckResolvedCallback(); |
40 | 40 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 WebTestDelegate* delegate_; | 72 WebTestDelegate* delegate_; |
73 | 73 |
74 base::WeakPtrFactory<SpellCheckClient> weak_factory_; | 74 base::WeakPtrFactory<SpellCheckClient> weak_factory_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(SpellCheckClient); | 76 DISALLOW_COPY_AND_ASSIGN(SpellCheckClient); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace test_runner | 79 } // namespace test_runner |
80 | 80 |
81 #endif // CONTENT_SHELL_TEST_RUNNER_SPELL_CHECK_CLIENT_H_ | 81 #endif // CONTENT_SHELL_TEST_RUNNER_SPELL_CHECK_CLIENT_H_ |
OLD | NEW |