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

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

Issue 1259073004: [Presentation API] Change ListenForSessionMessages API to client-style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix 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: 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 80e8050ca0556616e7d7912e45bfdddde3bc0485..285819d6b7b0b3ed6af4006c41b5e593d103a7eb 100644
--- a/content/public/browser/presentation_session_message.h
+++ b/content/public/browser/presentation_session_message.h
@@ -24,41 +24,13 @@ enum PresentationMessageType {
// Empty messages are allowed.
struct CONTENT_EXPORT PresentationSessionMessage {
public:
+ explicit PresentationSessionMessage(PresentationMessageType type);
~PresentationSessionMessage();
- // Creates string message, which takes the ownership of |message|.
- static scoped_ptr<PresentationSessionMessage> CreateStringMessage(
- const std::string& presentation_url,
- const std::string& presentation_id,
- scoped_ptr<std::string> message);
-
- // 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);
-
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;
-
- private:
- PresentationSessionMessage(const std::string& presentation_url,
- const std::string& presentation_id,
- 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);
+ const PresentationMessageType type;
+ std::string message;
+ std::vector<uint8_t> data;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698