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

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: merge and refactor 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 b5cb2a837a33634f7e63f546c31146ae8f5783ba..2ece28c81644e7cd16402fdafb6b15e0fe2cce88 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();
@@ -45,6 +48,8 @@ class PresentationConnection final : public EventTargetWithInlineData,
const WebPresentationSessionInfo&);
~PresentationConnection() override;
+ void setProxy(std::unique_ptr<WebPresentationConnectionProxy>) override;
+
// EventTarget implementation.
const AtomicString& interfaceName() const override;
ExecutionContext* getExecutionContext() const override;
@@ -78,14 +83,14 @@ class PresentationConnection final : public EventTargetWithInlineData,
bool matches(const String& id, const KURL&) const;
// Notifies the connection about its state change.
- void didChangeState(WebPresentationConnectionState);
+ void didChangeState(WebPresentationConnectionState) override;
// 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);
+ void didReceiveTextMessage(const WebString& message) override;
+ void didReceiveBinaryMessage(const uint8_t* data, size_t length) override;
WebPresentationConnectionState getState();
@@ -132,6 +137,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