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

Unified Diff: content/public/browser/presentation_session_message.h

Issue 1140713005: [PresentationAPI] Implements send API for Blob data from WebPresentationClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverted "using presentation::PresentationMessageType" Created 5 years, 6 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: content/public/browser/presentation_session_message.h
diff --git a/content/public/browser/presentation_session_message.h b/content/public/browser/presentation_session_message.h
index 54f65fcc84e5360a583e11e20454f525e80dced2..24e6a4cc72753537216d07217f1ec351e6a60c3c 100644
--- a/content/public/browser/presentation_session_message.h
+++ b/content/public/browser/presentation_session_message.h
@@ -13,6 +13,12 @@
namespace content {
+enum CONTENT_EXPORT PresentationMessageType {
+ TEXT,
+ ARRAY_BUFFER,
+ BLOB,
+};
+
// Represents a presentation session message.
// If this is a text message, |data| is null; otherwise, |message| is null.
// Empty messages are allowed.
@@ -26,8 +32,14 @@ struct CONTENT_EXPORT PresentationSessionMessage {
const std::string& presentation_id,
scoped_ptr<std::string> message);
- // Creates binary message, which takes the ownership of |data|.
- static scoped_ptr<PresentationSessionMessage> CreateBinaryMessage(
+ // Creates array buffer message, which takes the ownership of |data|.
+ static scoped_ptr<PresentationSessionMessage> CreateArrayBufferMessage(
+ const std::string& presentation_url,
+ const std::string& presentation_id,
+ scoped_ptr<std::vector<uint8_t>> data);
+
+ // Creates blob message, which takes the ownership of |data|.
+ static scoped_ptr<PresentationSessionMessage> CreateBlobMessage(
const std::string& presentation_url,
const std::string& presentation_id,
scoped_ptr<std::vector<uint8_t>> data);
@@ -35,6 +47,7 @@ struct CONTENT_EXPORT PresentationSessionMessage {
bool is_binary() const;
std::string presentation_url;
std::string presentation_id;
+ PresentationMessageType type;
scoped_ptr<std::string> message;
scoped_ptr<std::vector<uint8_t>> data;
@@ -44,6 +57,7 @@ struct CONTENT_EXPORT PresentationSessionMessage {
scoped_ptr<std::string> message);
PresentationSessionMessage(const std::string& presentation_url,
const std::string& presentation_id,
+ PresentationMessageType type,
scoped_ptr<std::vector<uint8_t>> data);
};
« no previous file with comments | « content/common/presentation/presentation_service.mojom ('k') | content/public/browser/presentation_session_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698