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

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

Issue 1259073004: [Presentation API] Change ListenForSessionMessages API to client-style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments Created 5 years, 4 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.cc
diff --git a/content/public/browser/presentation_session_message.cc b/content/public/browser/presentation_session_message.cc
index 4d7bfd538106ade384574cce5c6cd2ea1b3ce039..24c78d7c5b4098f60fe056fb664c5a1923f13b40 100644
--- a/content/public/browser/presentation_session_message.cc
+++ b/content/public/browser/presentation_session_message.cc
@@ -7,65 +7,13 @@
namespace content {
PresentationSessionMessage::PresentationSessionMessage(
- const std::string& presentation_url,
- const std::string& presentation_id,
- scoped_ptr<std::string> message)
- : presentation_url(presentation_url),
- presentation_id(presentation_id),
- type(PresentationMessageType::TEXT),
- message(message.Pass()),
- data(nullptr) {
-}
-
-PresentationSessionMessage::PresentationSessionMessage(
- const std::string& presentation_url,
- const std::string& presentation_id,
- PresentationMessageType type,
- scoped_ptr<std::vector<uint8_t>> data)
- : presentation_url(presentation_url),
- presentation_id(presentation_id),
- type(type),
- message(nullptr),
- data(data.Pass()) {
-}
+ PresentationMessageType type)
+ : type(type) {}
-// static
-scoped_ptr<PresentationSessionMessage>
-PresentationSessionMessage::CreateStringMessage(
- const std::string& presentation_url,
- const std::string& presentation_id,
- scoped_ptr<std::string> message) {
- return scoped_ptr<PresentationSessionMessage>(new PresentationSessionMessage(
- presentation_url, presentation_id, message.Pass()));
-}
-
-// static
-scoped_ptr<PresentationSessionMessage>
-PresentationSessionMessage::CreateArrayBufferMessage(
- const std::string& presentation_url,
- const std::string& presentation_id,
- scoped_ptr<std::vector<uint8_t>> data) {
- return scoped_ptr<PresentationSessionMessage>(new PresentationSessionMessage(
- presentation_url, presentation_id, PresentationMessageType::ARRAY_BUFFER,
- data.Pass()));
-}
-
-// static
-scoped_ptr<PresentationSessionMessage>
-PresentationSessionMessage::CreateBlobMessage(
- const std::string& presentation_url,
- const std::string& presentation_id,
- scoped_ptr<std::vector<uint8_t>> data) {
- return scoped_ptr<PresentationSessionMessage>(new PresentationSessionMessage(
- presentation_url, presentation_id, PresentationMessageType::BLOB,
- data.Pass()));
-}
+PresentationSessionMessage::~PresentationSessionMessage() {}
bool PresentationSessionMessage::is_binary() const {
return data != nullptr;
}
-PresentationSessionMessage::~PresentationSessionMessage() {
-}
-
} // namespace content
« no previous file with comments | « content/public/browser/presentation_session_message.h ('k') | content/renderer/presentation/presentation_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698