OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "extensions/browser/api/cast_channel/cast_message_util.h" | 5 #include "extensions/browser/api/cast_channel/cast_message_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "extensions/browser/api/cast_channel/cast_channel.pb.h" | |
12 #include "extensions/common/api/cast_channel.h" | 11 #include "extensions/common/api/cast_channel.h" |
| 12 #include "extensions/common/api/cast_channel/cast_channel.pb.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 static const char kAuthNamespace[] = | 15 static const char kAuthNamespace[] = |
16 "urn:x-cast:com.google.cast.tp.deviceauth"; | 16 "urn:x-cast:com.google.cast.tp.deviceauth"; |
17 // Sender and receiver IDs to use for platform messages. | 17 // Sender and receiver IDs to use for platform messages. |
18 static const char kPlatformSenderId[] = "sender-0"; | 18 static const char kPlatformSenderId[] = "sender-0"; |
19 static const char kPlatformReceiverId[] = "receiver-0"; | 19 static const char kPlatformReceiverId[] = "receiver-0"; |
20 } // namespace | 20 } // namespace |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 message_proto->set_payload_binary(auth_message_string); | 141 message_proto->set_payload_binary(auth_message_string); |
142 } | 142 } |
143 | 143 |
144 bool IsAuthMessage(const CastMessage& message) { | 144 bool IsAuthMessage(const CastMessage& message) { |
145 return message.namespace_() == kAuthNamespace; | 145 return message.namespace_() == kAuthNamespace; |
146 } | 146 } |
147 | 147 |
148 } // namespace cast_channel | 148 } // namespace cast_channel |
149 } // namespace core_api | 149 } // namespace core_api |
150 } // namespace extensions | 150 } // namespace extensions |
OLD | NEW |