refactor: ginify NativeTheme (#24673)

This commit is contained in:
Jeremy Rose 2020-07-22 11:01:30 -07:00 committed by GitHub
parent 10bf50e1fd
commit 734753dd7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 24 deletions

View file

@ -5,7 +5,9 @@
#ifndef SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
#define SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
#include "shell/common/gin_helper/event_emitter.h"
#include "gin/handle.h"
#include "gin/wrappable.h"
#include "shell/browser/event_emitter_mixin.h"
#include "ui/native_theme/native_theme.h"
#include "ui/native_theme/native_theme_observer.h"
@ -13,13 +15,17 @@ namespace electron {
namespace api {
class NativeTheme : public gin_helper::EventEmitter<NativeTheme>,
class NativeTheme : public gin::Wrappable<NativeTheme>,
public gin_helper::EventEmitterMixin<NativeTheme>,
public ui::NativeThemeObserver {
public:
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
static gin::Handle<NativeTheme> Create(v8::Isolate* isolate);
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
// gin::Wrappable
static gin::WrapperInfo kWrapperInfo;
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
v8::Isolate* isolate) override;
const char* GetTypeName() override;
protected:
NativeTheme(v8::Isolate* isolate,