chore: remove native_mate (Part 6) (#20391)
This commit is contained in:
parent
01ed55ff02
commit
4ac4b34ae9
6 changed files with 74 additions and 40 deletions
|
@ -10,13 +10,16 @@
|
|||
#include <vector>
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "native_mate/handle.h"
|
||||
#include "shell/browser/api/trackable_object.h"
|
||||
#include "shell/browser/notifications/notification.h"
|
||||
#include "shell/browser/notifications/notification_delegate.h"
|
||||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
|
||||
namespace gin {
|
||||
class Arguments;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
|
@ -39,9 +42,7 @@ class Notification : public mate::TrackableObject<Notification>,
|
|||
void NotificationClosed() override;
|
||||
|
||||
protected:
|
||||
Notification(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> wrapper,
|
||||
mate::Arguments* args);
|
||||
Notification(v8::Local<v8::Object> wrapper, gin::Arguments* args);
|
||||
~Notification() override;
|
||||
|
||||
void Show();
|
||||
|
@ -97,4 +98,22 @@ class Notification : public mate::TrackableObject<Notification>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
namespace gin {
|
||||
|
||||
// TODO(zcbenz): Remove this after converting Notification to gin::Wrapper.
|
||||
template <>
|
||||
struct Converter<electron::api::Notification*> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
electron::api::Notification** out) {
|
||||
return mate::ConvertFromV8(isolate, val, out);
|
||||
}
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
electron::api::Notification* in) {
|
||||
return mate::ConvertToV8(isolate, in);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace gin
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue