Add webFrame.setSpellCheckClient API

This commit is contained in:
Cheng Zhao 2014-12-18 13:54:01 -08:00
parent 896077222d
commit f1fbc5c701
4 changed files with 19 additions and 3 deletions

View file

@ -7,6 +7,7 @@
#include <string>
#include "base/memory/scoped_ptr.h"
#include "native_mate/handle.h"
#include "native_mate/wrappable.h"
@ -18,6 +19,8 @@ namespace atom {
namespace api {
class SpellCheckClient;
class WebFrame : public mate::Wrappable {
public:
static mate::Handle<WebFrame> Create(v8::Isolate* isolate);
@ -37,10 +40,16 @@ class WebFrame : public mate::Wrappable {
const base::string16& name, v8::Handle<v8::Object> options);
void AttachGuest(int element_instance_id);
// Set the provider that will be used by SpellCheckClient for spell check.
void SetSpellCheckProvider(v8::Isolate* isolate,
v8::Handle<v8::Object> provider);
// mate::Wrappable:
virtual mate::ObjectTemplateBuilder GetObjectTemplateBuilder(
v8::Isolate* isolate);
scoped_ptr<SpellCheckClient> spell_check_client_;
blink::WebLocalFrame* web_frame_;
DISALLOW_COPY_AND_ASSIGN(WebFrame);