OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BeforeInstallPromptEvent_h |
| 6 #define BeforeInstallPromptEvent_h |
| 7 |
| 8 #include "modules/EventModules.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class BeforeInstallPromptEventInit; |
| 14 |
| 15 class BeforeInstallPromptEvent final : public Event { |
| 16 DEFINE_WRAPPERTYPEINFO(); |
| 17 public: |
| 18 virtual ~BeforeInstallPromptEvent(); |
| 19 |
| 20 // For EventModules.cpp |
| 21 static PassRefPtrWillBeRawPtr<BeforeInstallPromptEvent> create() |
| 22 { |
| 23 return adoptRefWillBeNoop(new BeforeInstallPromptEvent()); |
| 24 } |
| 25 |
| 26 static PassRefPtrWillBeRawPtr<BeforeInstallPromptEvent> create(const AtomicS
tring& name, const String& platform) |
| 27 { |
| 28 return adoptRefWillBeNoop(new BeforeInstallPromptEvent(name, platform)); |
| 29 } |
| 30 |
| 31 static PassRefPtrWillBeRawPtr<BeforeInstallPromptEvent> create(const AtomicS
tring& name, const BeforeInstallPromptEventInit& init) |
| 32 { |
| 33 return adoptRefWillBeNoop(new BeforeInstallPromptEvent(name, init)); |
| 34 } |
| 35 |
| 36 String platform() const; |
| 37 ScriptPromise userChoice(ScriptState*) const; |
| 38 |
| 39 virtual const AtomicString& interfaceName() const override; |
| 40 |
| 41 private: |
| 42 BeforeInstallPromptEvent(); |
| 43 BeforeInstallPromptEvent(const AtomicString& name, const String& platform); |
| 44 BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPrompt
EventInit&); |
| 45 |
| 46 String m_platform; |
| 47 }; |
| 48 |
| 49 DEFINE_TYPE_CASTS(BeforeInstallPromptEvent, Event, event, event->interfaceName()
== EventNames::BeforeInstallPromptEvent, event.interfaceName() == EventNames::B
eforeInstallPromptEvent); |
| 50 |
| 51 } // namespace blink |
| 52 |
| 53 #endif // BeforeInstallPromptEvent_h |
OLD | NEW |