chore: move gin::DeprecatedWrappable to gin_helper (#47996)

chore: move gin::DeprecatedWrappable to gin_helper (#47958)

* chore: move gin::DeprecatedWrappable to gin_helper

This is in preparation for migrating to gin::Wrappable
based on cppgc #47922
The upstream class will be deleted soon via roller PR but
the cppgc migration should happen outside the roll, this
change retains the current functionality by copying the
implementation into //electron/shell/common/gin_helper.
The class can be deleted once the cppgc migration is complete.

* chore: fix lint:cpp

Co-authored-by: Robo <hop2deep@gmail.com>
This commit is contained in:
Calvin
2025-08-08 22:00:45 -06:00
committed by GitHub
parent 74ad696f98
commit 4fff74b73e
53 changed files with 344 additions and 224 deletions

View File

@@ -13,6 +13,7 @@
#include "shell/browser/ui/electron_menu_model.h"
#include "shell/common/gin_helper/constructible.h"
#include "shell/common/gin_helper/pinnable.h"
#include "shell/common/gin_helper/wrappable.h"
#include "ui/base/mojom/menu_source_type.mojom-forward.h"
namespace gin {
@@ -24,7 +25,7 @@ namespace electron::api {
class BaseWindow;
class WebFrameMain;
class Menu : public gin::DeprecatedWrappable<Menu>,
class Menu : public gin_helper::DeprecatedWrappable<Menu>,
public gin_helper::EventEmitterMixin<Menu>,
public gin_helper::Constructible<Menu>,
public gin_helper::Pinnable<Menu>,
@@ -36,7 +37,7 @@ class Menu : public gin::DeprecatedWrappable<Menu>,
static void FillObjectTemplate(v8::Isolate*, v8::Local<v8::ObjectTemplate>);
static const char* GetClassName() { return "Menu"; }
// gin::Wrappable
// gin_helper::Wrappable
static gin::DeprecatedWrapperInfo kWrapperInfo;
const char* GetTypeName() override;