Index: Source/modules/app_banner/AppBannerController.cpp |
diff --git a/Source/modules/app_banner/AppBannerController.cpp b/Source/modules/app_banner/AppBannerController.cpp |
index 52324957fbe6da20b8291c1075914d5532f5d58d..02417723cd9fd69dfaccee1f863feb7ce1c712e4 100644 |
--- a/Source/modules/app_banner/AppBannerController.cpp |
+++ b/Source/modules/app_banner/AppBannerController.cpp |
@@ -10,18 +10,22 @@ |
#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/WebAppBannerPromptReply.h" |
namespace blink { |
// static |
-void AppBannerController::willShowInstallBannerPrompt(LocalFrame* frame, const WebString& platform, WebAppBannerPromptReply* reply) |
+void AppBannerController::willShowInstallBannerPrompt(LocalFrame* frame, const WebVector<WebString>& platforms, WebAppBannerPromptReply* reply) |
{ |
ASSERT(RuntimeEnabledFeatures::appBannerEnabled()); |
+ Vector<String> wtfPlatforms; |
+ for (const WebString& platform : platforms) |
+ wtfPlatforms.append(platform); |
// 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, platform)) |
+ *reply = frame->domWindow()->dispatchEvent(BeforeInstallPromptEvent::create(EventTypeNames::beforeinstallprompt, wtfPlatforms)) |
? WebAppBannerPromptReply::None : WebAppBannerPromptReply::Cancel; |
} |