Extend blink::WebTextCheckClient in atom::api::SpellCheckClient
This commit is contained in:
parent
4d9f309888
commit
45db999593
1 changed files with 8 additions and 3 deletions
|
@ -13,16 +13,19 @@
|
||||||
#include "native_mate/scoped_persistent.h"
|
#include "native_mate/scoped_persistent.h"
|
||||||
#include "third_party/WebKit/public/platform/WebVector.h"
|
#include "third_party/WebKit/public/platform/WebVector.h"
|
||||||
#include "third_party/WebKit/public/web/WebSpellCheckClient.h"
|
#include "third_party/WebKit/public/web/WebSpellCheckClient.h"
|
||||||
|
#include "third_party/WebKit/public/web/WebTextCheckClient.h"
|
||||||
|
|
||||||
namespace blink {
|
namespace blink {
|
||||||
struct WebTextCheckingResult;
|
struct WebTextCheckingResult;
|
||||||
|
class WebTextCheckingCompletion;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
namespace api {
|
namespace api {
|
||||||
|
|
||||||
class SpellCheckClient : public blink::WebSpellCheckClient {
|
class SpellCheckClient : public blink::WebSpellCheckClient,
|
||||||
|
public blink::WebTextCheckClient {
|
||||||
public:
|
public:
|
||||||
SpellCheckClient(const std::string& language,
|
SpellCheckClient(const std::string& language,
|
||||||
bool auto_spell_correct_turned_on,
|
bool auto_spell_correct_turned_on,
|
||||||
|
@ -31,7 +34,7 @@ class SpellCheckClient : public blink::WebSpellCheckClient {
|
||||||
virtual ~SpellCheckClient();
|
virtual ~SpellCheckClient();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// blink::WebSpellCheckClient:
|
// blink::WebTextCheckClient:
|
||||||
void CheckSpelling(
|
void CheckSpelling(
|
||||||
const blink::WebString& text,
|
const blink::WebString& text,
|
||||||
int& misspelledOffset,
|
int& misspelledOffset,
|
||||||
|
@ -39,7 +42,9 @@ class SpellCheckClient : public blink::WebSpellCheckClient {
|
||||||
blink::WebVector<blink::WebString>* optionalSuggestions) override;
|
blink::WebVector<blink::WebString>* optionalSuggestions) override;
|
||||||
void RequestCheckingOfText(
|
void RequestCheckingOfText(
|
||||||
const blink::WebString& textToCheck,
|
const blink::WebString& textToCheck,
|
||||||
blink::WebTextCheckingResult completionCallback) override;
|
blink::WebTextCheckingCompletion* completionCallback) override;
|
||||||
|
|
||||||
|
// blink::WebSpellCheckClient:
|
||||||
void ShowSpellingUI(bool show) override;
|
void ShowSpellingUI(bool show) override;
|
||||||
bool IsShowingSpellingUI() override;
|
bool IsShowingSpellingUI() override;
|
||||||
void UpdateSpellingUIWithMisspelledWord(
|
void UpdateSpellingUIWithMisspelledWord(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue