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

Side by Side Diff: chrome/browser/extensions/api/cast_channel/cast_message_util.h

Issue 35443002: Update CastSocket connection flow to check for receiver credentials. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EXTENSIONS_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace extensions { 10 namespace extensions {
11 namespace api { 11 namespace api {
12 namespace cast_channel { 12 namespace cast_channel {
13 13
14 class CastMessage; 14 class CastMessage;
15 class DeviceAuthMessage;
15 struct MessageInfo; 16 struct MessageInfo;
16 17
17 // Fills |message_proto| from |message| and returns true on success. 18 // Fills |message_proto| from |message| and returns true on success.
18 bool MessageInfoToCastMessage(const MessageInfo& message, 19 bool MessageInfoToCastMessage(const MessageInfo& message,
19 CastMessage* message_proto); 20 CastMessage* message_proto);
20 21
21 // Fills |message| from |message_proto| and returns true on success. 22 // Fills |message| from |message_proto| and returns true on success.
22 bool CastMessageToMessageInfo(const CastMessage& message_proto, 23 bool CastMessageToMessageInfo(const CastMessage& message_proto,
23 MessageInfo* message); 24 MessageInfo* message);
24 25
25 // Returns a human readable string for |message_proto|. 26 // Returns a human readable string for |message_proto|.
26 const std::string MessageProtoToString(const CastMessage& message_proto); 27 std::string CastMessageToString(const CastMessage& message_proto);
28
29 // Returns a human readable string for |message|.
30 std::string AuthMessageToString(const DeviceAuthMessage& message);
31
32 // Fills |message_proto| appropriately for an auth challenge request message.
33 void CreateAuthChallengeMessage(CastMessage* message_proto);
34
35 // Returns whether the given message is an auth handshake message.
36 bool IsAuthMessage(const CastMessage& message);
27 37
28 } // namespace cast_channel 38 } // namespace cast_channel
29 } // namespace api 39 } // namespace api
30 } // namespace extensions 40 } // namespace extensions
31 41
32 #endif // CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ 42 #endif // CHROME_BROWSER_EXTENSIONS_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698