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

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

Issue 2379703002: [Presentation API] (alternative) 1-UA: send message between controller and receiver page (Closed)
Patch Set: resolve code review comments from Mark 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/presentation/PresentationConnection.h
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.h b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
index c71720ffe27fd83264891c235dca25195ab13e8c..00791eb28fa3e097b4fa15770d77be9e9d85d78a 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
@@ -11,7 +11,9 @@
#include "core/frame/DOMWindowProperty.h"
#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
+#include "public/platform/modules/presentation/WebPresentationConnection.h"
#include "public/platform/modules/presentation/WebPresentationConnectionClient.h"
+#include "public/platform/modules/presentation/WebPresentationConnectionProxy.h"
#include "wtf/text/WTFString.h"
#include <memory>
@@ -28,7 +30,8 @@ class PresentationReceiver;
class PresentationRequest;
class PresentationConnection final : public EventTargetWithInlineData,
- public DOMWindowProperty {
+ public DOMWindowProperty,
+ public WebPresentationConnection {
USING_GARBAGE_COLLECTED_MIXIN(PresentationConnection);
DEFINE_WRAPPERTYPEINFO();
@@ -83,8 +86,8 @@ class PresentationConnection final : public EventTargetWithInlineData,
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);
+ void didReceiveTextMessage(const WebString& message) override;
+ void didReceiveBinaryMessage(const uint8_t* data, size_t length) override;
protected:
// EventTarget implementation.
@@ -104,7 +107,10 @@ class PresentationConnection final : public EventTargetWithInlineData,
class Message;
- PresentationConnection(LocalFrame*, const String& id, const KURL&);
+ PresentationConnection(LocalFrame*,
+ const String& id,
+ const KURL&,
+ WebPresentationConnectionProxy*);
bool canSendMessage(ExceptionState&);
void handleMessageQueue();
@@ -125,6 +131,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