Chromium Code Reviews| 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 |