mac: Don't rely on NSImage to read file

It doesn't work with asar.
This commit is contained in:
Cheng Zhao 2015-02-12 12:24:18 +08:00
parent 903ff0b61a
commit 509ce0d5cb
3 changed files with 20 additions and 29 deletions

View file

@ -46,6 +46,11 @@ class NativeImage : public mate::Wrappable {
v8::Isolate* isolate) override;
private:
#if defined(OS_MACOSX)
// Mark the image as template image if possible.
static void MakeTemplateImage(gfx::Image* image);
#endif
v8::Handle<v8::Value> ToPNG(v8::Isolate* isolate);
v8::Handle<v8::Value> ToJPEG(v8::Isolate* isolate, int quality);
bool IsEmpty();