| 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 #ifndef AppBannerController_h | 5 #ifndef AppBannerController_h |
| 6 #define AppBannerController_h | 6 #define AppBannerController_h |
| 7 | 7 |
| 8 #include "modules/ModulesExport.h" | 8 #include "modules/ModulesExport.h" |
| 9 #include "platform/heap/Persistent.h" |
| 10 #include "public/platform/modules/app_banner/app_banner.mojom-blink.h" |
| 9 #include "wtf/Allocator.h" | 11 #include "wtf/Allocator.h" |
| 10 #include "wtf/Noncopyable.h" | 12 #include "wtf/Vector.h" |
| 11 | 13 |
| 12 namespace blink { | 14 namespace blink { |
| 13 | 15 |
| 14 enum class WebAppBannerPromptReply; | |
| 15 class LocalFrame; | 16 class LocalFrame; |
| 16 class WebAppBannerClient; | |
| 17 class WebString; | |
| 18 template <typename T> | |
| 19 class WebVector; | |
| 20 | 17 |
| 21 // FIXME: unless userChoice ends up implemented, this class should not exist and | 18 class MODULES_EXPORT AppBannerController final |
| 22 // a regular static method could be used instead. | 19 : public mojom::blink::AppBannerController { |
| 23 class MODULES_EXPORT AppBannerController final { | 20 public: |
| 24 STATIC_ONLY(AppBannerController); | 21 explicit AppBannerController(LocalFrame&); |
| 25 | 22 |
| 26 public: | 23 static void bindMojoRequest(LocalFrame*, |
| 27 static void willShowInstallBannerPrompt(int requestId, | 24 mojom::blink::AppBannerControllerRequest); |
| 28 WebAppBannerClient*, | 25 |
| 29 LocalFrame*, | 26 void BannerPromptRequest(mojom::blink::AppBannerServicePtr, |
| 30 const WebVector<WebString>& platforms, | 27 mojom::blink::AppBannerEventRequest, |
| 31 WebAppBannerPromptReply*); | 28 const Vector<String>& platforms, |
| 29 const BannerPromptRequestCallback&) override; |
| 30 |
| 31 private: |
| 32 WeakPersistent<LocalFrame> m_frame; |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace blink | 35 } // namespace blink |
| 35 | 36 |
| 36 #endif // AppBannerController_h | 37 #endif // AppBannerController_h |
| OLD | NEW |