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
commit 4fff74b73e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 344 additions and 224 deletions

View file

@ -9,13 +9,13 @@
#include <vector>
#include "base/memory/raw_ptr.h"
#include "gin/wrappable.h"
#include "shell/browser/event_emitter_mixin.h"
#include "shell/browser/notifications/notification.h"
#include "shell/browser/notifications/notification_delegate.h"
#include "shell/browser/notifications/notification_presenter.h"
#include "shell/common/gin_helper/cleaned_up_at_exit.h"
#include "shell/common/gin_helper/constructible.h"
#include "shell/common/gin_helper/wrappable.h"
#include "ui/gfx/image/image.h"
namespace gin {
@ -30,7 +30,7 @@ class ErrorThrower;
namespace electron::api {
class Notification final : public gin::DeprecatedWrappable<Notification>,
class Notification final : public gin_helper::DeprecatedWrappable<Notification>,
public gin_helper::EventEmitterMixin<Notification>,
public gin_helper::Constructible<Notification>,
public gin_helper::CleanedUpAtExit,
@ -53,7 +53,7 @@ class Notification final : public gin::DeprecatedWrappable<Notification>,
void NotificationClosed() override;
void NotificationFailed(const std::string& error) override;
// gin::Wrappable
// gin_helper::Wrappable
static gin::DeprecatedWrapperInfo kWrapperInfo;
const char* GetTypeName() override;