build: fix build with enable_builtin_spellchecker=false (#26466)
This commit is contained in:
parent
e017d8714e
commit
434f7749db
1 changed files with 8 additions and 0 deletions
|
@ -106,6 +106,8 @@ content::RenderFrame* GetRenderFrame(v8::Local<v8::Value> value) {
|
|||
return content::RenderFrame::FromWebFrame(frame);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
|
||||
bool SpellCheckWord(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> window,
|
||||
const std::string& word,
|
||||
|
@ -124,6 +126,8 @@ bool SpellCheckWord(v8::Isolate* isolate,
|
|||
w.c_str(), 0, word.size(), id, &start, &length, optional_suggestions);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
class RenderFrameStatus final : public content::RenderFrameObserver {
|
||||
public:
|
||||
explicit RenderFrameStatus(content::RenderFrame* render_frame)
|
||||
|
@ -753,6 +757,8 @@ blink::WebCacheResourceTypeStats GetResourceUsage(v8::Isolate* isolate) {
|
|||
return stats;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
||||
|
||||
bool IsWordMisspelled(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> window,
|
||||
const std::string& word) {
|
||||
|
@ -767,6 +773,8 @@ std::vector<base::string16> GetWordSuggestions(v8::Isolate* isolate,
|
|||
return suggestions;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void ClearCache(v8::Isolate* isolate) {
|
||||
isolate->IdleNotificationDeadline(0.5);
|
||||
blink::WebCache::Clear();
|
||||
|
|
Loading…
Reference in a new issue