Chromium Code Reviews| 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 "modules/EventModules.h" | 9 #include "modules/EventModules.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 static PassRefPtrWillBeRawPtr<BeforeInstallPromptEvent> create(const AtomicS tring& name, const BeforeInstallPromptEventInit& init) | 33 static PassRefPtrWillBeRawPtr<BeforeInstallPromptEvent> create(const AtomicS tring& name, const BeforeInstallPromptEventInit& init) |
| 34 { | 34 { |
| 35 return adoptRefWillBeNoop(new BeforeInstallPromptEvent(name, init)); | 35 return adoptRefWillBeNoop(new BeforeInstallPromptEvent(name, init)); |
| 36 } | 36 } |
| 37 | 37 |
| 38 Vector<String> platforms() const; | 38 Vector<String> platforms() const; |
| 39 ScriptPromise userChoice(ScriptState*); | 39 ScriptPromise userChoice(ScriptState*); |
| 40 | 40 |
| 41 virtual const AtomicString& interfaceName() const override; | 41 virtual const AtomicString& interfaceName() const override; |
| 42 | 42 |
| 43 // This is called after the site has first called preventDefault(), and now | |
| 44 // wishes to redispatch the event at a later point in their own context. | |
|
mlamouri (slow - plz ping)
2015/06/06 21:40:55
I don't think this comment is useful. prompt() is
| |
| 45 void prompt(); | |
| 46 | |
| 43 private: | 47 private: |
| 44 BeforeInstallPromptEvent(); | 48 BeforeInstallPromptEvent(); |
| 45 BeforeInstallPromptEvent(const AtomicString& name, const Vector<String>& pla tforms, int requestId, WebAppBannerClient*); | 49 BeforeInstallPromptEvent(const AtomicString& name, const Vector<String>& pla tforms, int requestId, WebAppBannerClient*); |
| 46 BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPrompt EventInit&); | 50 BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPrompt EventInit&); |
| 47 | 51 |
| 48 Vector<String> m_platforms; | 52 Vector<String> m_platforms; |
| 49 ScriptPromise m_userChoice; | 53 ScriptPromise m_userChoice; |
| 50 | 54 |
| 51 int m_requestId; | 55 int m_requestId; |
| 52 WebAppBannerClient* m_client; | 56 WebAppBannerClient* m_client; |
| 57 bool m_redispatched; | |
| 53 }; | 58 }; |
| 54 | 59 |
| 55 DEFINE_TYPE_CASTS(BeforeInstallPromptEvent, Event, event, event->interfaceName() == EventNames::BeforeInstallPromptEvent, event.interfaceName() == EventNames::B eforeInstallPromptEvent); | 60 DEFINE_TYPE_CASTS(BeforeInstallPromptEvent, Event, event, event->interfaceName() == EventNames::BeforeInstallPromptEvent, event.interfaceName() == EventNames::B eforeInstallPromptEvent); |
| 56 | 61 |
| 57 } // namespace blink | 62 } // namespace blink |
| 58 | 63 |
| 59 #endif // BeforeInstallPromptEvent_h | 64 #endif // BeforeInstallPromptEvent_h |
| OLD | NEW |