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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h

Issue 2471263003: [Presentation API] (4th)(1-UA blink side) Add WebPresentationConnection and WebPresentationConnecti… (Closed)
Patch Set: resolve code review comments from mlamouri Created 3 years, 11 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/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);
};

Powered by Google App Engine
This is Rietveld 408576698