Index: Source/modules/app_banner/AppBannerController.cpp |
diff --git a/Source/modules/app_banner/AppBannerController.cpp b/Source/modules/app_banner/AppBannerController.cpp |
index af8b67f11f5c43cf8ccff7711fa76374464bbd6b..6c7a1748696069af23a5dc3b333693ad80c60a58 100644 |
--- a/Source/modules/app_banner/AppBannerController.cpp |
+++ b/Source/modules/app_banner/AppBannerController.cpp |
@@ -6,11 +6,13 @@ |
#include "modules/app_banner/AppBannerController.h" |
#include "core/EventTypeNames.h" |
+#include "core/dom/Document.h" |
#include "core/frame/DOMWindow.h" |
#include "core/frame/LocalFrame.h" |
#include "modules/app_banner/BeforeInstallPromptEvent.h" |
#include "platform/RuntimeEnabledFeatures.h" |
#include "public/platform/WebVector.h" |
+#include "public/platform/modules/app_banner/WebAppBannerClient.h" |
#include "public/platform/modules/app_banner/WebAppBannerPromptReply.h" |
namespace blink { |
@@ -26,7 +28,7 @@ void AppBannerController::willShowInstallBannerPrompt(int requestId, WebAppBanne |
// dispatchEvent() returns whether the default behavior can happen. In other |
// words, it returns false if preventDefault() was called. |
- *reply = frame->domWindow()->dispatchEvent(BeforeInstallPromptEvent::create(EventTypeNames::beforeinstallprompt, wtfPlatforms, requestId, client)) |
+ *reply = frame->domWindow()->dispatchEvent(BeforeInstallPromptEvent::create(EventTypeNames::beforeinstallprompt, frame->document(), wtfPlatforms, requestId, client)) |
? WebAppBannerPromptReply::None : WebAppBannerPromptReply::Cancel; |
} |