| 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 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ | 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 scoped_refptr<cast_channel::Logger> logger_; | 167 scoped_refptr<cast_channel::Logger> logger_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(CastMessageHandler); | 169 DISALLOW_COPY_AND_ASSIGN(CastMessageHandler); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 // Validates that |connect_info| represents a valid IP end point and returns a | 172 // Validates that |connect_info| represents a valid IP end point and returns a |
| 173 // new IPEndPoint if so. Otherwise returns nullptr. | 173 // new IPEndPoint if so. Otherwise returns nullptr. |
| 174 static net::IPEndPoint* ParseConnectInfo( | 174 static net::IPEndPoint* ParseConnectInfo( |
| 175 const api::cast_channel::ConnectInfo& connect_info); | 175 const api::cast_channel::ConnectInfo& connect_info); |
| 176 | 176 |
| 177 void OnOpen(cast_channel::ChannelError result); | 177 void OnOpen(int channel_id, cast_channel::ChannelError result); |
| 178 | 178 |
| 179 std::unique_ptr<api::cast_channel::Open::Params> params_; | 179 std::unique_ptr<api::cast_channel::Open::Params> params_; |
| 180 // The id of the newly opened socket. | |
| 181 int new_channel_id_; | |
| 182 CastChannelAPI* api_; | 180 CastChannelAPI* api_; |
| 183 std::unique_ptr<net::IPEndPoint> ip_endpoint_; | 181 std::unique_ptr<net::IPEndPoint> ip_endpoint_; |
| 184 cast_channel::ChannelAuthType channel_auth_; | 182 cast_channel::ChannelAuthType channel_auth_; |
| 185 base::TimeDelta liveness_timeout_; | 183 base::TimeDelta liveness_timeout_; |
| 186 base::TimeDelta ping_interval_; | 184 base::TimeDelta ping_interval_; |
| 187 | 185 |
| 188 FRIEND_TEST_ALL_PREFIXES(CastChannelOpenFunctionTest, TestParseConnectInfo); | 186 FRIEND_TEST_ALL_PREFIXES(CastChannelOpenFunctionTest, TestParseConnectInfo); |
| 189 DISALLOW_COPY_AND_ASSIGN(CastChannelOpenFunction); | 187 DISALLOW_COPY_AND_ASSIGN(CastChannelOpenFunction); |
| 190 }; | 188 }; |
| 191 | 189 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 227 |
| 230 std::unique_ptr<api::cast_channel::Close::Params> params_; | 228 std::unique_ptr<api::cast_channel::Close::Params> params_; |
| 231 CastChannelAPI* api_; | 229 CastChannelAPI* api_; |
| 232 | 230 |
| 233 DISALLOW_COPY_AND_ASSIGN(CastChannelCloseFunction); | 231 DISALLOW_COPY_AND_ASSIGN(CastChannelCloseFunction); |
| 234 }; | 232 }; |
| 235 | 233 |
| 236 } // namespace extensions | 234 } // namespace extensions |
| 237 | 235 |
| 238 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ | 236 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ |
| OLD | NEW |