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

Side by Side Diff: Source/modules/app_banner/BeforeInstallPromptEvent.h

Issue 942913002: [AppBanner] Blink implementation of an event when an install banner is shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review comments Created 5 years, 9 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698