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

Unified Diff: extensions/browser/api/cast_channel/cast_message_util.h

Issue 2926313002: Revert of [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/cast_channel/cast_message_util.h
diff --git a/extensions/browser/api/cast_channel/cast_message_util.h b/extensions/browser/api/cast_channel/cast_message_util.h
index f9fe4e5b9536426d135af0d17a7550c2b0ac50c8..bf1bbbd80c765aea21c07bc6ddd2249086c0f783 100644
--- a/extensions/browser/api/cast_channel/cast_message_util.h
+++ b/extensions/browser/api/cast_channel/cast_message_util.h
@@ -7,23 +7,39 @@
#include <string>
-namespace cast_channel {
-class CastMessage;
-} // namespace cast_channel
-
namespace extensions {
namespace api {
namespace cast_channel {
+class AuthContext;
+class CastMessage;
+class DeviceAuthMessage;
struct MessageInfo;
// Fills |message_proto| from |message| and returns true on success.
bool MessageInfoToCastMessage(const MessageInfo& message,
- ::cast_channel::CastMessage* message_proto);
+ CastMessage* message_proto);
+
+// Checks if the contents of |message_proto| are valid.
+bool IsCastMessageValid(const CastMessage& message_proto);
// Fills |message| from |message_proto| and returns true on success.
-bool CastMessageToMessageInfo(const ::cast_channel::CastMessage& message_proto,
+bool CastMessageToMessageInfo(const CastMessage& message_proto,
MessageInfo* message);
+
+// Returns a human readable string for |message_proto|.
+std::string CastMessageToString(const CastMessage& message_proto);
+
+// Returns a human readable string for |message|.
+std::string AuthMessageToString(const DeviceAuthMessage& message);
+
+// Fills |message_proto| appropriately for an auth challenge request message.
+// Uses the nonce challenge in |auth_context|.
+void CreateAuthChallengeMessage(CastMessage* message_proto,
+ const AuthContext& auth_context);
+
+// Returns whether the given message is an auth handshake message.
+bool IsAuthMessage(const CastMessage& message);
} // namespace cast_channel
} // namespace api
« no previous file with comments | « extensions/browser/api/cast_channel/cast_framer_unittest.cc ('k') | extensions/browser/api/cast_channel/cast_message_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698