chore: remove native_mate (Part 7) (#20561)

* refactor: use gin converters in api::Protocol

* refactor: convert JS constructor impl to gin

* refactor: use InitWithArgs helper

* fix: gin_helper::Dictionary should behave the same with mate

* fix cpplint warnings

* refactor: no more need to patch gin/dictionary.h
This commit is contained in:
Cheng Zhao 2019-10-15 10:15:23 +09:00 committed by GitHub
parent 6c6bff81ac
commit 1ecfcc8c70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 274 additions and 368 deletions

View file

@ -13,6 +13,7 @@
#include "shell/browser/api/trackable_object.h"
#include "shell/browser/ui/tray_icon.h"
#include "shell/browser/ui/tray_icon_observer.h"
#include "shell/common/gin_helper/error_thrower.h"
namespace gfx {
class Image;
@ -34,16 +35,15 @@ class NativeImage;
class Tray : public mate::TrackableObject<Tray>, public TrayIconObserver {
public:
static mate::WrappableBase* New(mate::Handle<NativeImage> image,
mate::Arguments* args);
static mate::WrappableBase* New(gin_helper::ErrorThrower thrower,
mate::Handle<NativeImage> image,
gin::Arguments* args);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
protected:
Tray(v8::Isolate* isolate,
v8::Local<v8::Object> wrapper,
mate::Handle<NativeImage> image);
Tray(mate::Handle<NativeImage> image, gin::Arguments* args);
~Tray() override;
// TrayIconObserver: