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

Unified Diff: components/cast_channel/cast_channel_enum.h

Issue 2891923004: [cast_channel] Make cast_channel related files not depend on "cast_channel.h" (Closed)
Patch Set: fix windows compile errors Created 3 years, 7 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
« no previous file with comments | « components/cast_channel/OWNERS ('k') | components/cast_channel/cast_channel_enum.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cast_channel/cast_channel_enum.h
diff --git a/components/cast_channel/cast_channel_enum.h b/components/cast_channel/cast_channel_enum.h
new file mode 100644
index 0000000000000000000000000000000000000000..e176cbd8fea03c465ac13d38d5ec7473be760cf3
--- /dev/null
+++ b/components/cast_channel/cast_channel_enum.h
@@ -0,0 +1,48 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_CAST_CHANNEL_CAST_CHANNEL_ENUM_H_
+#define COMPONENTS_CAST_CHANNEL_CAST_CHANNEL_ENUM_H_
+
+#include <string>
+
+namespace cast_channel {
+
+// Maps to enum ReadyState in cast_channel.idl
+enum class ReadyState {
+ NONE,
+ CONNECTING,
+ OPEN,
+ CLOSING,
+ CLOSED,
+};
+
+// Maps to enum ChannelError in cast_channel.idl
+enum class ChannelError {
+ NONE,
+ CHANNEL_NOT_OPEN,
+ AUTHENTICATION_ERROR,
+ CONNECT_ERROR,
+ CAST_SOCKET_ERROR,
+ TRANSPORT_ERROR,
+ INVALID_MESSAGE,
+ INVALID_CHANNEL_ID,
+ CONNECT_TIMEOUT,
+ PING_TIMEOUT,
+ UNKNOWN,
+};
+
+// Maps to enum ChannelAuth in cast_channel.idl
+enum class ChannelAuthType {
+ NONE,
+ SSL_VERIFIED,
+};
+
+std::string ReadyStateToString(ReadyState ready_state);
+std::string ChannelErrorToString(ChannelError channel_error);
+std::string ChannelAuthTypeToString(ChannelAuthType channel_auth);
+
+} // namespace cast_channel
+
+#endif // COMPONENTS_CAST_CHANNEL_CAST_CHANNEL_ENUM_H_
« no previous file with comments | « components/cast_channel/OWNERS ('k') | components/cast_channel/cast_channel_enum.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698