| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BeforeInstallPromptEvent_h | 5 #ifndef BeforeInstallPromptEvent_h |
| 6 #define BeforeInstallPromptEvent_h | 6 #define BeforeInstallPromptEvent_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptPromiseProperty.h" | 9 #include "bindings/core/v8/ScriptPromiseProperty.h" |
| 10 #include "modules/EventModules.h" | 10 #include "modules/EventModules.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 static BeforeInstallPromptEvent* create(const AtomicString& name, const Befo
reInstallPromptEventInit& init) | 38 static BeforeInstallPromptEvent* create(const AtomicString& name, const Befo
reInstallPromptEventInit& init) |
| 39 { | 39 { |
| 40 return new BeforeInstallPromptEvent(name, init); | 40 return new BeforeInstallPromptEvent(name, init); |
| 41 } | 41 } |
| 42 | 42 |
| 43 Vector<String> platforms() const; | 43 Vector<String> platforms() const; |
| 44 ScriptPromise userChoice(ScriptState*); | 44 ScriptPromise userChoice(ScriptState*); |
| 45 ScriptPromise prompt(ScriptState*); | 45 ScriptPromise prompt(ScriptState*); |
| 46 | 46 |
| 47 const AtomicString& interfaceName() const override; | 47 const AtomicString& interfaceName() const override; |
| 48 void preventDefault() override; |
| 48 | 49 |
| 49 DECLARE_VIRTUAL_TRACE(); | 50 DECLARE_VIRTUAL_TRACE(); |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 BeforeInstallPromptEvent(); | 53 BeforeInstallPromptEvent(); |
| 53 BeforeInstallPromptEvent(const AtomicString& name, ExecutionContext*, const
Vector<String>& platforms, int requestId, WebAppBannerClient*); | 54 BeforeInstallPromptEvent(const AtomicString& name, ExecutionContext*, const
Vector<String>& platforms, int requestId, WebAppBannerClient*); |
| 54 BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPrompt
EventInit&); | 55 BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPrompt
EventInit&); |
| 55 | 56 |
| 56 Vector<String> m_platforms; | 57 Vector<String> m_platforms; |
| 57 | 58 |
| 58 int m_requestId; | 59 int m_requestId; |
| 59 WebAppBannerClient* m_client; | 60 WebAppBannerClient* m_client; |
| 60 Member<UserChoiceProperty> m_userChoice; | 61 Member<UserChoiceProperty> m_userChoice; |
| 61 bool m_registered; | 62 bool m_registered; |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 DEFINE_TYPE_CASTS(BeforeInstallPromptEvent, Event, event, event->interfaceName()
== EventNames::BeforeInstallPromptEvent, event.interfaceName() == EventNames::B
eforeInstallPromptEvent); | 65 DEFINE_TYPE_CASTS(BeforeInstallPromptEvent, Event, event, event->interfaceName()
== EventNames::BeforeInstallPromptEvent, event.interfaceName() == EventNames::B
eforeInstallPromptEvent); |
| 65 | 66 |
| 66 } // namespace blink | 67 } // namespace blink |
| 67 | 68 |
| 68 #endif // BeforeInstallPromptEvent_h | 69 #endif // BeforeInstallPromptEvent_h |
| OLD | NEW |