| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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 CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <string> | |
| 11 #include <vector> | |
| 12 | |
| 13 #include "base/optional.h" | |
| 14 | |
| 15 namespace media_router { | |
| 16 | |
| 17 // TODO(mfoltz): Replace with nearly-identical | |
| 18 // content::PresentationConnectionMessage. | |
| 19 struct RouteMessage { | |
| 20 enum Type { TEXT, BINARY } type = TEXT; | |
| 21 // Used when the |type| is TEXT. | |
| 22 base::Optional<std::string> text; | |
| 23 // Used when the |type| is BINARY. | |
| 24 base::Optional<std::vector<uint8_t>> binary; | |
| 25 | |
| 26 RouteMessage(); | |
| 27 RouteMessage(const RouteMessage& other); | |
| 28 ~RouteMessage(); | |
| 29 | |
| 30 std::string ToHumanReadableString() const; | |
| 31 }; | |
| 32 | |
| 33 } // namespace media_router | |
| 34 | |
| 35 #endif // CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_ | |
| OLD | NEW |