Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1260)

Unified Diff: Source/modules/app_banner/BeforeInstallPromptEvent.h

Issue 1257823003: Revert of Refactor BeforeInstallPromptEvent to use ScriptPromiseProperty (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/app_banner/BeforeInstallPromptEvent.h
diff --git a/Source/modules/app_banner/BeforeInstallPromptEvent.h b/Source/modules/app_banner/BeforeInstallPromptEvent.h
index ff5612fd799fb68df74c4ea49a1ded5a225c50b7..a28d0a55b894c197f2977210271bf028b80185eb 100644
--- a/Source/modules/app_banner/BeforeInstallPromptEvent.h
+++ b/Source/modules/app_banner/BeforeInstallPromptEvent.h
@@ -6,19 +6,13 @@
#define BeforeInstallPromptEvent_h
#include "bindings/core/v8/ScriptPromise.h"
-#include "bindings/core/v8/ScriptPromiseProperty.h"
#include "modules/EventModules.h"
-#include "modules/app_banner/AppBannerPromptResult.h"
#include "platform/heap/Handle.h"
namespace blink {
-class BeforeInstallPromptEvent;
class BeforeInstallPromptEventInit;
class WebAppBannerClient;
-
-using UserChoiceProperty = ScriptPromiseProperty<RawPtrWillBeMember<BeforeInstallPromptEvent>, Member<AppBannerPromptResult>, ToV8UndefinedGenerator>;
-using PromptProperty = ScriptPromiseProperty<RawPtrWillBeMember<BeforeInstallPromptEvent>, ToV8UndefinedGenerator, Member<DOMException>>;
class BeforeInstallPromptEvent final : public Event {
DEFINE_WRAPPERTYPEINFO();
@@ -31,9 +25,9 @@
return adoptRefWillBeNoop(new BeforeInstallPromptEvent());
}
- static PassRefPtrWillBeRawPtr<BeforeInstallPromptEvent> create(const AtomicString& name, ExecutionContext* executionContext, const Vector<String>& platforms, int requestId, WebAppBannerClient* client)
+ static PassRefPtrWillBeRawPtr<BeforeInstallPromptEvent> create(const AtomicString& name, const Vector<String>& platforms, int requestId, WebAppBannerClient*client)
{
- return adoptRefWillBeNoop(new BeforeInstallPromptEvent(name, executionContext, platforms, requestId, client));
+ return adoptRefWillBeNoop(new BeforeInstallPromptEvent(name, platforms, requestId, client));
}
static PassRefPtrWillBeRawPtr<BeforeInstallPromptEvent> create(const AtomicString& name, const BeforeInstallPromptEventInit& init)
@@ -43,25 +37,22 @@
Vector<String> platforms() const;
ScriptPromise userChoice(ScriptState*);
- ScriptPromise prompt(ScriptState*);
const AtomicString& interfaceName() const override;
- UserChoiceProperty* userChoiceProperty() { return m_userChoice.get(); };
-
- DECLARE_VIRTUAL_TRACE();
+ ScriptPromise prompt(ScriptState*);
private:
BeforeInstallPromptEvent();
- BeforeInstallPromptEvent(const AtomicString& name, ExecutionContext*, const Vector<String>& platforms, int requestId, WebAppBannerClient*);
+ BeforeInstallPromptEvent(const AtomicString& name, const Vector<String>& platforms, int requestId, WebAppBannerClient*);
BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPromptEventInit&);
Vector<String> m_platforms;
+ ScriptPromise m_userChoice;
int m_requestId;
WebAppBannerClient* m_client;
- PersistentWillBeMember<UserChoiceProperty> m_userChoice;
- PersistentWillBeMember<PromptProperty> m_prompt;
+ bool m_redispatched;
};
DEFINE_TYPE_CASTS(BeforeInstallPromptEvent, Event, event, event->interfaceName() == EventNames::BeforeInstallPromptEvent, event.interfaceName() == EventNames::BeforeInstallPromptEvent);
« no previous file with comments | « Source/modules/app_banner/AppBannerPromptResult.cpp ('k') | Source/modules/app_banner/BeforeInstallPromptEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698