Use NativeImage when converting images from V8

This commit is contained in:
Cheng Zhao 2015-02-11 19:22:41 +08:00
parent 6556602bdc
commit 054b6a9817
6 changed files with 27 additions and 166 deletions

View file

@ -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();