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:
parent
6c6bff81ac
commit
1ecfcc8c70
43 changed files with 274 additions and 368 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "native_mate/handle.h"
|
||||
#include "shell/browser/api/trackable_object.h"
|
||||
#include "shell/browser/native_browser_view.h"
|
||||
#include "shell/common/gin_helper/error_thrower.h"
|
||||
|
||||
namespace gfx {
|
||||
class Rect;
|
||||
|
@ -33,7 +34,8 @@ class WebContents;
|
|||
class BrowserView : public mate::TrackableObject<BrowserView>,
|
||||
public content::WebContentsObserver {
|
||||
public:
|
||||
static mate::WrappableBase* New(mate::Arguments* args);
|
||||
static mate::WrappableBase* New(gin_helper::ErrorThrower thrower,
|
||||
gin::Arguments* args);
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
@ -44,19 +46,13 @@ class BrowserView : public mate::TrackableObject<BrowserView>,
|
|||
int32_t ID() const;
|
||||
|
||||
protected:
|
||||
BrowserView(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> wrapper,
|
||||
const mate::Dictionary& options);
|
||||
BrowserView(gin::Arguments* args, const mate::Dictionary& options);
|
||||
~BrowserView() override;
|
||||
|
||||
// content::WebContentsObserver:
|
||||
void WebContentsDestroyed() override;
|
||||
|
||||
private:
|
||||
void Init(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> wrapper,
|
||||
const mate::Dictionary& options);
|
||||
|
||||
void SetAutoResize(AutoResizeFlags flags);
|
||||
void SetBounds(const gfx::Rect& bounds);
|
||||
gfx::Rect GetBounds();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue