AsNativeRepresentation => getNativeHandle

This commit is contained in:
Paul Betts 2016-03-14 19:50:31 -07:00
parent e3e6cd6fd8
commit d344c1e408
2 changed files with 4 additions and 4 deletions

View file

@ -184,8 +184,8 @@ mate::ObjectTemplateBuilder NativeImage::GetObjectTemplateBuilder(
template_.Reset(isolate, mate::ObjectTemplateBuilder(isolate) template_.Reset(isolate, mate::ObjectTemplateBuilder(isolate)
.SetMethod("toPng", &NativeImage::ToPNG) .SetMethod("toPng", &NativeImage::ToPNG)
.SetMethod("toJpeg", &NativeImage::ToJPEG) .SetMethod("toJpeg", &NativeImage::ToJPEG)
.SetMethod("asNativeRepresentation", .SetMethod("getNativeHandle",
&NativeImage::AsNativeRepresentation) &NativeImage::GetNativeHandle)
.SetMethod("toDataURL", &NativeImage::ToDataURL) .SetMethod("toDataURL", &NativeImage::ToDataURL)
.SetMethod("toDataUrl", &NativeImage::ToDataURL) // deprecated. .SetMethod("toDataUrl", &NativeImage::ToDataURL) // deprecated.
.SetMethod("isEmpty", &NativeImage::IsEmpty) .SetMethod("isEmpty", &NativeImage::IsEmpty)
@ -223,7 +223,7 @@ std::string NativeImage::ToDataURL() {
return data_url; return data_url;
} }
v8::Local<v8::Value> NativeImage::AsNativeRepresentation( v8::Local<v8::Value> NativeImage::GetNativeHandle(
v8::Isolate* isolate, v8::Isolate* isolate,
mate::Arguments* args) { mate::Arguments* args) {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)

View file

@ -61,7 +61,7 @@ class NativeImage : public mate::Wrappable {
private: private:
v8::Local<v8::Value> ToPNG(v8::Isolate* isolate); v8::Local<v8::Value> ToPNG(v8::Isolate* isolate);
v8::Local<v8::Value> ToJPEG(v8::Isolate* isolate, int quality); v8::Local<v8::Value> ToJPEG(v8::Isolate* isolate, int quality);
v8::Local<v8::Value> AsNativeRepresentation( v8::Local<v8::Value> GetNativeHandle(
v8::Isolate* isolate, v8::Isolate* isolate,
mate::Arguments* args); mate::Arguments* args);
std::string ToDataURL(); std::string ToDataURL();