Enable creating NativeImage from file path

This commit is contained in:
Cheng Zhao 2015-02-11 18:41:06 +08:00
parent 2876f15063
commit 6556602bdc
4 changed files with 143 additions and 1 deletions

View file

@ -9,6 +9,10 @@
#include "native_mate/wrappable.h"
#include "ui/gfx/image/image.h"
namespace base {
class FilePath;
}
namespace gfx {
class Size;
}
@ -25,6 +29,8 @@ class NativeImage : public mate::Wrappable {
v8::Isolate* isolate, v8::Handle<v8::Value> buffer);
static mate::Handle<NativeImage> CreateFromJPEG(
v8::Isolate* isolate, v8::Handle<v8::Value> buffer);
static mate::Handle<NativeImage> CreateFromPath(
v8::Isolate* isolate, const base::FilePath& path);
protected:
explicit NativeImage(const gfx::Image& image);