| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Returns the socket corresponding to |channel_id| if one exists, or null | 122 // Returns the socket corresponding to |channel_id| if one exists, or null |
| 123 // otherwise. | 123 // otherwise. |
| 124 cast_channel::CastSocket* GetSocket(int channel_id); | 124 cast_channel::CastSocket* GetSocket(int channel_id); |
| 125 | 125 |
| 126 private: | 126 private: |
| 127 // Sets the function result from |channel_info|. | 127 // Sets the function result from |channel_info|. |
| 128 void SetResultFromChannelInfo(const cast_channel::ChannelInfo& channel_info); | 128 void SetResultFromChannelInfo(const cast_channel::ChannelInfo& channel_info); |
| 129 | 129 |
| 130 // The API resource manager for CastSockets. | 130 // The API resource manager for CastSockets. |
| 131 ApiResourceManager<cast_channel::CastSocket>* manager_; | 131 ApiResourceManager<cast_channel::CastSocket>* manager_; |
| 132 | |
| 133 // The result of the function. | |
| 134 cast_channel::ChannelError error_; | |
| 135 }; | 132 }; |
| 136 | 133 |
| 137 class CastChannelOpenFunction : public CastChannelAsyncApiFunction { | 134 class CastChannelOpenFunction : public CastChannelAsyncApiFunction { |
| 138 public: | 135 public: |
| 139 CastChannelOpenFunction(); | 136 CastChannelOpenFunction(); |
| 140 | 137 |
| 141 protected: | 138 protected: |
| 142 ~CastChannelOpenFunction() override; | 139 ~CastChannelOpenFunction() override; |
| 143 | 140 |
| 144 // AsyncApiFunction: | 141 // AsyncApiFunction: |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 CAST_CHANNEL_SETAUTHORITYKEYS) | 250 CAST_CHANNEL_SETAUTHORITYKEYS) |
| 254 | 251 |
| 255 scoped_ptr<cast_channel::SetAuthorityKeys::Params> params_; | 252 scoped_ptr<cast_channel::SetAuthorityKeys::Params> params_; |
| 256 | 253 |
| 257 DISALLOW_COPY_AND_ASSIGN(CastChannelSetAuthorityKeysFunction); | 254 DISALLOW_COPY_AND_ASSIGN(CastChannelSetAuthorityKeysFunction); |
| 258 }; | 255 }; |
| 259 | 256 |
| 260 } // namespace extensions | 257 } // namespace extensions |
| 261 | 258 |
| 262 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ | 259 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_API_H_ |
| OLD | NEW |