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

Unified Diff: Source/modules/presentation/PresentationSession.h

Issue 1206513004: [PresentationAPI] on-session-message handler for binary messages (Blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert "add typedef uint8_t for WIN32" Created 5 years, 5 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: Source/modules/presentation/PresentationSession.h
diff --git a/Source/modules/presentation/PresentationSession.h b/Source/modules/presentation/PresentationSession.h
index be13d80c228bf4e8914b462042153500f6bab64a..da6e51d84fffac09afe5d1d641ad379e5a6d71da 100644
--- a/Source/modules/presentation/PresentationSession.h
+++ b/Source/modules/presentation/PresentationSession.h
@@ -49,6 +49,9 @@ public:
void send(Blob*, ExceptionState&);
void close();
+ String binaryType() const;
+ void setBinaryType(const String&);
+
DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
@@ -58,8 +61,9 @@ public:
// Notifies the session about its state change.
void didChangeState(WebPresentationSessionState);
- // Notifies the session about new text message.
+ // Notifies the session about new message.
void didReceiveTextMessage(const String& message);
+ void didReceiveBinaryMessage(const uint8_t* data, size_t length);
private:
class BlobLoader;
@@ -70,6 +74,11 @@ private:
MessageTypeBlob,
};
+ enum BinaryType {
+ BinaryTypeBlob,
+ BinaryTypeArrayBuffer
+ };
+
struct Message {
Message(const String& text)
: type(MessageTypeText)
@@ -105,6 +114,8 @@ private:
// For Blob data handling.
Member<BlobLoader> m_blobLoader;
Deque<OwnPtr<Message>> m_messages;
+
+ BinaryType m_binaryType;
};
} // namespace blink
« no previous file with comments | « Source/modules/presentation/PresentationController.cpp ('k') | Source/modules/presentation/PresentationSession.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698