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

Unified Diff: extensions/browser/api/cast_channel/cast_channel_type_util.cc

Issue 2891923004: [cast_channel] Make cast_channel related files not depend on "cast_channel.h" (Closed)
Patch Set: resolve code review comments from Mark 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
Index: extensions/browser/api/cast_channel/cast_channel_type_util.cc
diff --git a/extensions/browser/api/cast_channel/cast_channel_type_util.cc b/extensions/browser/api/cast_channel/cast_channel_type_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..98e98c3f55e239ec4bb5b224f19745cf4ad99686
--- /dev/null
+++ b/extensions/browser/api/cast_channel/cast_channel_type_util.cc
@@ -0,0 +1,33 @@
+// 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.
+
+#include "extensions/browser/api/cast_channel/cast_channel_type_util.h"
+
+namespace extensions {
+namespace api {
+namespace cast_channel {
+
+api::cast_channel::ReadyState ToReadyState(
+ ::cast_channel::ReadyState ready_state) {
+ return static_cast<api::cast_channel::ReadyState>(ready_state);
imcheng 2017/05/24 22:11:23 static_cast from one enum to another isn't really
zhaobin 2017/05/25 00:49:23 Done.
+}
+
+api::cast_channel::ChannelError ToChannelError(
+ ::cast_channel::ChannelError channel_error) {
+ return static_cast<api::cast_channel::ChannelError>(channel_error);
+}
+
+api::cast_channel::ChannelAuthType ToChannelAuthType(
+ ::cast_channel::ChannelAuthType channel_auth) {
+ return static_cast<api::cast_channel::ChannelAuthType>(channel_auth);
+}
+
+::cast_channel::ChannelAuthType ToChannelAuthTypeInternal(
+ api::cast_channel::ChannelAuthType channel_auth) {
+ return static_cast<::cast_channel::ChannelAuthType>(channel_auth);
+}
+
+} // namespace cast_channel
+} // namespace api
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698