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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationConnection.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/PresentationConnection.h
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.h b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
index 72fe6730858479e1c2f2a27b9e5707b1c4b24d5f..804d109eeef6651a7343a2b420fad7522cd02a77 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
@@ -11,6 +11,8 @@
#include "core/fileapi/FileError.h"
#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
+#include "public/platform/modules/presentation/WebPresentationConnection.h"
+#include "public/platform/modules/presentation/WebPresentationConnectionProxy.h"
#include "public/platform/modules/presentation/WebPresentationController.h"
#include "public/platform/modules/presentation/WebPresentationSessionInfo.h"
#include "wtf/text/WTFString.h"
@@ -29,7 +31,8 @@ class PresentationReceiver;
class PresentationRequest;
class PresentationConnection final : public EventTargetWithInlineData,
- public ContextClient {
+ public ContextClient,
+ public WebPresentationConnection {
USING_GARBAGE_COLLECTED_MIXIN(PresentationConnection);
DEFINE_WRAPPERTYPEINFO();
@@ -78,15 +81,14 @@ class PresentationConnection final : public EventTargetWithInlineData,
// |url|.
bool matches(const String& id, const KURL&) const;
- // Notifies the connection about its state change.
- void didChangeState(WebPresentationConnectionState);
-
// Notifies the connection about its state change to 'closed'.
void didClose(WebPresentationConnectionCloseReason, const String& message);
- // Notifies the presentation about new message.
- void didReceiveTextMessage(const String& message);
- void didReceiveBinaryMessage(const uint8_t* data, size_t length);
+ // WebPresentationConnection implementation.
+ void bindProxy(std::unique_ptr<WebPresentationConnectionProxy>) override;
+ void didReceiveTextMessage(const WebString& message) override;
+ void didReceiveBinaryMessage(const uint8_t* data, size_t length) override;
+ void didChangeState(WebPresentationConnectionState) override;
WebPresentationConnectionState getState();
@@ -133,6 +135,8 @@ class PresentationConnection final : public EventTargetWithInlineData,
HeapDeque<Member<Message>> m_messages;
BinaryType m_binaryType;
+
+ std::unique_ptr<WebPresentationConnectionProxy> m_proxy;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698