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

Unified Diff: third_party/WebKit/Source/modules/app_banner/AppBannerController.h

Issue 2393513004: Convert app banners to use Mojo. (Closed)
Patch Set: Add TODO Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/app_banner/AppBannerController.h
diff --git a/third_party/WebKit/Source/modules/app_banner/AppBannerController.h b/third_party/WebKit/Source/modules/app_banner/AppBannerController.h
index cef446cd5dd592df7557a85279f1b02e07cbed92..7831c0aba4e50878b74ab971caaba92b74cfed2f 100644
--- a/third_party/WebKit/Source/modules/app_banner/AppBannerController.h
+++ b/third_party/WebKit/Source/modules/app_banner/AppBannerController.h
@@ -6,29 +6,30 @@
#define AppBannerController_h
#include "modules/ModulesExport.h"
+#include "platform/heap/Persistent.h"
+#include "public/platform/modules/app_banner/app_banner.mojom-blink.h"
#include "wtf/Allocator.h"
-#include "wtf/Noncopyable.h"
+#include "wtf/Vector.h"
namespace blink {
-enum class WebAppBannerPromptReply;
class LocalFrame;
-class WebAppBannerClient;
-class WebString;
-template <typename T>
-class WebVector;
-
-// FIXME: unless userChoice ends up implemented, this class should not exist and
-// a regular static method could be used instead.
-class MODULES_EXPORT AppBannerController final {
- STATIC_ONLY(AppBannerController);
+class MODULES_EXPORT AppBannerController final
+ : public mojom::blink::AppBannerController {
public:
- static void willShowInstallBannerPrompt(int requestId,
- WebAppBannerClient*,
- LocalFrame*,
- const WebVector<WebString>& platforms,
- WebAppBannerPromptReply*);
+ explicit AppBannerController(LocalFrame&);
+
+ static void bindMojoRequest(LocalFrame*,
+ mojom::blink::AppBannerControllerRequest);
+
+ void BannerPromptRequest(mojom::blink::AppBannerServicePtr,
+ mojom::blink::AppBannerEventRequest,
+ const Vector<String>& platforms,
+ const BannerPromptRequestCallback&) override;
+
+ private:
+ WeakPersistent<LocalFrame> m_frame;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698