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

Side by Side Diff: chrome/browser/media/router/route_message.h

Issue 2310753002: Media Remoting: Data/Control plumbing between renderer and Media Router. (Closed)
Patch Set: Just a REBASE on ToT before commit. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/optional.h" 13 #include "base/optional.h"
14 14
15 namespace media_router { 15 namespace media_router {
16 16
17 struct RouteMessage { 17 struct RouteMessage {
18 enum Type { TEXT, BINARY } type = TEXT; 18 enum Type { TEXT, BINARY } type = TEXT;
19 // Used when the |type| is TEXT. 19 // Used when the |type| is TEXT.
20 base::Optional<std::string> text; 20 base::Optional<std::string> text;
21 // Used when the |type| is BINARY. 21 // Used when the |type| is BINARY.
22 base::Optional<std::vector<uint8_t>> binary; 22 base::Optional<std::vector<uint8_t>> binary;
23 23
24 RouteMessage(); 24 RouteMessage();
25 RouteMessage(const RouteMessage& other); 25 RouteMessage(const RouteMessage& other);
26 ~RouteMessage(); 26 ~RouteMessage();
27
28 std::string ToHumanReadableString() const;
27 }; 29 };
28 30
29 } // namespace media_router 31 } // namespace media_router
30 32
31 #endif // CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_ 33 #endif // CHROME_BROWSER_MEDIA_ROUTER_ROUTE_MESSAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698