Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_MESSAGE_H_ | |
| 6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_MESSAGE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "content/common/content_export.h" | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 // Represents a presentation session message. | |
| 17 // 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.
| |
| 18 struct CONTENT_EXPORT PresentationSessionMessage { | |
| 19 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.
| |
| 20 const std::string& presentation_id, | |
| 21 scoped_ptr<std::string> message); | |
| 22 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.
| |
| 23 const std::string& presentation_id, | |
| 24 scoped_ptr<std::vector<uint8_t>> data); | |
| 25 ~PresentationSessionMessage(); | |
| 26 | |
| 27 const std::string presentation_url; | |
| 28 const std::string presentation_id; | |
| 29 scoped_ptr<std::string> message; | |
| 30 scoped_ptr<std::vector<uint8_t>> data; | |
| 31 | |
| 32 bool is_binary() const; | |
| 33 }; | |
| 34 | |
| 35 } // namespace content | |
| 36 | |
| 37 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SESSION_H_ | |
| OLD | NEW |