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 #include "modules/app_banner/BeforeInstallPromptEvent.h" | 5 #include "modules/app_banner/BeforeInstallPromptEvent.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptPromise.h" | 7 #include "bindings/core/v8/ScriptPromise.h" |
8 #include "core/dom/DOMException.h" | 8 #include "core/dom/DOMException.h" |
9 #include "core/dom/ExceptionCode.h" | 9 #include "core/dom/ExceptionCode.h" |
10 #include "core/frame/UseCounter.h" | 10 #include "core/frame/UseCounter.h" |
11 #include "modules/app_banner/AppBannerCallbacks.h" | 11 #include "modules/app_banner/AppBannerCallbacks.h" |
12 #include "modules/app_banner/BeforeInstallPromptEventInit.h" | 12 #include "modules/app_banner/BeforeInstallPromptEventInit.h" |
13 #include "public/platform/modules/app_banner/WebAppBannerClient.h" | 13 #include "public/platform/modules/app_banner/WebAppBannerClient.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 BeforeInstallPromptEvent::BeforeInstallPromptEvent() | |
18 { | |
19 } | |
20 | |
21 BeforeInstallPromptEvent::BeforeInstallPromptEvent(const AtomicString& name, Exe
cutionContext* executionContext, const Vector<String>& platforms, int requestId,
WebAppBannerClient* client) | 17 BeforeInstallPromptEvent::BeforeInstallPromptEvent(const AtomicString& name, Exe
cutionContext* executionContext, const Vector<String>& platforms, int requestId,
WebAppBannerClient* client) |
22 : Event(name, false, true) | 18 : Event(name, false, true) |
23 , m_platforms(platforms) | 19 , m_platforms(platforms) |
24 , m_requestId(requestId) | 20 , m_requestId(requestId) |
25 , m_client(client) | 21 , m_client(client) |
26 , m_userChoice(new UserChoiceProperty(executionContext, this, UserChoiceProp
erty::UserChoice)) | 22 , m_userChoice(new UserChoiceProperty(executionContext, this, UserChoiceProp
erty::UserChoice)) |
27 , m_registered(false) | 23 , m_registered(false) |
28 { | 24 { |
29 UseCounter::count(executionContext, UseCounter::BeforeInstallPromptEvent); | 25 UseCounter::count(executionContext, UseCounter::BeforeInstallPromptEvent); |
30 } | 26 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 UseCounter::count(target()->getExecutionContext(), UseCounter::BeforeInstall
PromptEventPreventDefault); | 83 UseCounter::count(target()->getExecutionContext(), UseCounter::BeforeInstall
PromptEventPreventDefault); |
88 } | 84 } |
89 | 85 |
90 DEFINE_TRACE(BeforeInstallPromptEvent) | 86 DEFINE_TRACE(BeforeInstallPromptEvent) |
91 { | 87 { |
92 visitor->trace(m_userChoice); | 88 visitor->trace(m_userChoice); |
93 Event::trace(visitor); | 89 Event::trace(visitor); |
94 } | 90 } |
95 | 91 |
96 } // namespace blink | 92 } // namespace blink |
OLD | NEW |