Use NativeImage when converting images from V8
This commit is contained in:
parent
6556602bdc
commit
054b6a9817
6 changed files with 27 additions and 166 deletions
|
@ -106,6 +106,8 @@ v8::Persistent<v8::ObjectTemplate> template_;
|
|||
|
||||
} // namespace
|
||||
|
||||
NativeImage::NativeImage() {}
|
||||
|
||||
NativeImage::NativeImage(const gfx::Image& image) : image_(image) {}
|
||||
|
||||
NativeImage::~NativeImage() {}
|
||||
|
|
|
@ -32,6 +32,11 @@ class NativeImage : public mate::Wrappable {
|
|||
static mate::Handle<NativeImage> CreateFromPath(
|
||||
v8::Isolate* isolate, const base::FilePath& path);
|
||||
|
||||
// The default constructor should only be used by image_converter.cc.
|
||||
NativeImage();
|
||||
|
||||
const gfx::Image& image() const { return image_; }
|
||||
|
||||
protected:
|
||||
explicit NativeImage(const gfx::Image& image);
|
||||
virtual ~NativeImage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue