Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9976c6e92e5dfe19b6fdfedbca8929be158b5c68 |
| --- /dev/null |
| +++ b/content/public/browser/presentation_session_message.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_MESSAGE_H_ |
| +#define CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_MESSAGE_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +// Represents a presentation session message. |
| +// If this is a text message, data.size is 0; otherwise, message.size is 0. |
|
mark a. foltz
2015/05/01 19:42:07
data/message are nullptr, not a zero-length object
haibinlu
2015/05/02 00:32:55
Done.
|
| +struct CONTENT_EXPORT PresentationSessionMessage { |
| + explicit PresentationSessionMessage(const std::string& presentation_url, |
|
mark a. foltz
2015/05/01 19:42:07
explicit is only required for 1-arg ctors.
haibinlu
2015/05/02 00:32:55
Acknowledged.
|
| + const std::string& presentation_id, |
| + scoped_ptr<std::string> message); |
| + explicit PresentationSessionMessage(const std::string& presentation_url, |
|
mark a. foltz
2015/05/01 19:42:07
Prefer making these ctors private and exposing sta
haibinlu
2015/05/02 00:32:55
Done.
|
| + const std::string& presentation_id, |
| + scoped_ptr<std::vector<uint8_t>> data); |
| + ~PresentationSessionMessage(); |
| + |
| + const std::string presentation_url; |
| + const std::string presentation_id; |
| + scoped_ptr<std::string> message; |
| + scoped_ptr<std::vector<uint8_t>> data; |
| + |
| + bool is_binary() const; |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_ |