| Index: third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
|
| diff --git a/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp b/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
|
| index 98efdd2747064feb0e1ea7107f522345c10b4685..58d3345f8023e14d5b0f61fc22dcfe127b36d4f7 100644
|
| --- a/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
|
| +++ b/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
|
| @@ -5,35 +5,34 @@
|
| #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 "public/platform/WebVector.h"
|
| -#include "public/platform/modules/app_banner/WebAppBannerClient.h"
|
| -#include "public/platform/modules/app_banner/WebAppBannerPromptReply.h"
|
| +#include "third_party/WebKit/public/platform/modules/app_banner/app_banner.mojom-blink.h"
|
| +#include <utility>
|
|
|
| namespace blink {
|
|
|
| // static
|
| void AppBannerController::willShowInstallBannerPrompt(
|
| - int requestId,
|
| - WebAppBannerClient* client,
|
| LocalFrame* frame,
|
| + mojo::ScopedMessagePipeHandle serviceHandle,
|
| + mojo::ScopedMessagePipeHandle eventHandle,
|
| const WebVector<WebString>& platforms,
|
| - WebAppBannerPromptReply* reply) {
|
| + mojom::AppBannerPromptReply* reply) {
|
| 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, frame->document(), wtfPlatforms,
|
| - requestId, client)) == DispatchEventResult::NotCanceled
|
| - ? WebAppBannerPromptReply::None
|
| - : WebAppBannerPromptReply::Cancel;
|
| + *reply = frame->domWindow()->dispatchEvent(BeforeInstallPromptEvent::create(
|
| + EventTypeNames::beforeinstallprompt, frame,
|
| + std::move(serviceHandle), std::move(eventHandle),
|
| + wtfPlatforms)) == DispatchEventResult::NotCanceled
|
| + ? mojom::AppBannerPromptReply::NONE
|
| + : mojom::AppBannerPromptReply::CANCEL;
|
| }
|
|
|
| } // namespace blink
|
|
|