Index: third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h |
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h b/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h |
index 79b33160cb4133f97f2e6842922eb57eb801bc7a..a54018c2483fce1986bc396e095cf96d86c17691 100644 |
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h |
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h |
@@ -7,10 +7,12 @@ |
#include "platform/heap/Handle.h" |
#include "public/platform/WebCallbacks.h" |
+#include "public/platform/modules/presentation/WebPresentationConnectionCallbacks.h" |
#include "wtf/Noncopyable.h" |
namespace blink { |
+class PresentationConnection; |
class PresentationRequest; |
class ScriptPromiseResolver; |
struct WebPresentationSessionInfo; |
@@ -21,18 +23,22 @@ struct WebPresentationError; |
// the PresentationRequest object that originated the call in its constructor |
// and will pass it to the created PresentationConnection. |
class PresentationConnectionCallbacks final |
- : public WebCallbacks<const WebPresentationSessionInfo&, |
- const WebPresentationError&> { |
+ : public WebPresentationConnectionCallbacks { |
public: |
PresentationConnectionCallbacks(ScriptPromiseResolver*, PresentationRequest*); |
~PresentationConnectionCallbacks() override = default; |
+ // WebCallbacks implementation |
void onSuccess(const WebPresentationSessionInfo&) override; |
void onError(const WebPresentationError&) override; |
+ // WebPresentationConnectionCallbacks implementation |
+ WebPresentationConnection* getConnection() override; |
+ |
private: |
Persistent<ScriptPromiseResolver> m_resolver; |
Persistent<PresentationRequest> m_request; |
+ WeakPersistent<PresentationConnection> m_connection; |
WTF_MAKE_NONCOPYABLE(PresentationConnectionCallbacks); |
}; |