Enable creating NativeImage from file path
This commit is contained in:
parent
2876f15063
commit
6556602bdc
4 changed files with 143 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue