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

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

Issue 1214793002: Fix a memory leak in the app banner prompt layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again 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 unified diff | Download patch
OLDNEW
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/ScriptPromiseResolver.h"
9 #include "modules/EventModules.h" 10 #include "modules/EventModules.h"
10 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class BeforeInstallPromptEventInit; 15 class BeforeInstallPromptEventInit;
15 class WebAppBannerClient; 16 class WebAppBannerClient;
16 17
17 class BeforeInstallPromptEvent final : public Event { 18 class BeforeInstallPromptEvent final : public Event {
18 DEFINE_WRAPPERTYPEINFO(); 19 DEFINE_WRAPPERTYPEINFO();
(...skipping 22 matching lines...) Expand all
41 virtual const AtomicString& interfaceName() const override; 42 virtual const AtomicString& interfaceName() const override;
42 43
43 ScriptPromise prompt(ScriptState*); 44 ScriptPromise prompt(ScriptState*);
44 45
45 private: 46 private:
46 BeforeInstallPromptEvent(); 47 BeforeInstallPromptEvent();
47 BeforeInstallPromptEvent(const AtomicString& name, const Vector<String>& pla tforms, int requestId, WebAppBannerClient*); 48 BeforeInstallPromptEvent(const AtomicString& name, const Vector<String>& pla tforms, int requestId, WebAppBannerClient*);
48 BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPrompt EventInit&); 49 BeforeInstallPromptEvent(const AtomicString& name, const BeforeInstallPrompt EventInit&);
49 50
50 Vector<String> m_platforms; 51 Vector<String> m_platforms;
51 ScriptPromise m_userChoice; 52 RefPtrWillBeMember<ScriptPromiseResolver> m_resolver;
52 53
53 int m_requestId; 54 int m_requestId;
54 WebAppBannerClient* m_client; 55 WebAppBannerClient* m_client;
55 bool m_redispatched; 56 bool m_redispatched;
56 }; 57 };
57 58
58 DEFINE_TYPE_CASTS(BeforeInstallPromptEvent, Event, event, event->interfaceName() == EventNames::BeforeInstallPromptEvent, event.interfaceName() == EventNames::B eforeInstallPromptEvent); 59 DEFINE_TYPE_CASTS(BeforeInstallPromptEvent, Event, event, event->interfaceName() == EventNames::BeforeInstallPromptEvent, event.interfaceName() == EventNames::B eforeInstallPromptEvent);
59 60
60 } // namespace blink 61 } // namespace blink
61 62
62 #endif // BeforeInstallPromptEvent_h 63 #endif // BeforeInstallPromptEvent_h
OLDNEW
« no previous file with comments | « LayoutTests/app_banner/app-banner-event-prompt.html ('k') | Source/modules/app_banner/BeforeInstallPromptEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698