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

Side by Side Diff: extensions/common/api/cast_channel.idl

Issue 627573002: Enable passing cast channel certificate authority keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unneeded header include. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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 // API for communicating with a Google Cast device over an authenticated 5 // API for communicating with a Google Cast device over an authenticated
6 // channel. 6 // channel.
7 namespace cast.channel { 7 namespace cast.channel {
8 8
9 // The state of the channel. 9 // The state of the channel.
10 enum ReadyState { 10 enum ReadyState {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 // Callback holding the result of a channel operation. 151 // Callback holding the result of a channel operation.
152 callback ChannelInfoCallback = void (ChannelInfo result); 152 callback ChannelInfoCallback = void (ChannelInfo result);
153 153
154 // Callback from <code>getLogs</code> method. 154 // Callback from <code>getLogs</code> method.
155 // |log|: compressed serialized raw bytes containing the logs. 155 // |log|: compressed serialized raw bytes containing the logs.
156 // The log is formatted using protocol buffer. 156 // The log is formatted using protocol buffer.
157 // See extensions/browser/api/cast_channel/logging.proto for definition. 157 // See extensions/browser/api/cast_channel/logging.proto for definition.
158 // Compression is in gzip format. 158 // Compression is in gzip format.
159 callback GetLogsCallback = void (ArrayBuffer log); 159 callback GetLogsCallback = void (ArrayBuffer log);
160 160
161 // Callback from <code>setAuthorityKeys</code> method.
162 callback SetAuthorityKeysCallback = void (DOMString result);
163
161 interface Functions { 164 interface Functions {
162 // Opens a new channel to the Cast receiver specified by connectInfo. Only 165 // Opens a new channel to the Cast receiver specified by connectInfo. Only
163 // one channel may be connected to same receiver from the same extension at 166 // one channel may be connected to same receiver from the same extension at
164 // a time. If the open request is successful, the callback will be invoked 167 // a time. If the open request is successful, the callback will be invoked
165 // with a ChannelInfo with readyState == 'connecting'. If unsuccessful, the 168 // with a ChannelInfo with readyState == 'connecting'. If unsuccessful, the
166 // callback will be invoked with a ChannelInfo with channel.readyState == 169 // callback will be invoked with a ChannelInfo with channel.readyState ==
167 // 'closed', channel.errorState will be set to the error condition, and 170 // 'closed', channel.errorState will be set to the error condition, and
168 // onError will be fired with error details. 171 // onError will be fired with error details.
169 // 172 //
170 // TODO(mfoltz): Convert 'any' to ConnectInfo once all clients are updated 173 // TODO(mfoltz): Convert 'any' to ConnectInfo once all clients are updated
(...skipping 16 matching lines...) Expand all
187 // 'closed'. If unsuccessful, channel.readyState will be set to 'closed', 190 // 'closed'. If unsuccessful, channel.readyState will be set to 'closed',
188 // and channel.errorState will be set to the error condition. 191 // and channel.errorState will be set to the error condition.
189 static void close(ChannelInfo channel, 192 static void close(ChannelInfo channel,
190 ChannelInfoCallback callback); 193 ChannelInfoCallback callback);
191 194
192 // Get logs in compressed serialized format. See GetLogsCallback for 195 // Get logs in compressed serialized format. See GetLogsCallback for
193 // details. 196 // details.
194 // |callback|: If successful, |callback| is invoked with data. Otherwise, 197 // |callback|: If successful, |callback| is invoked with data. Otherwise,
195 // an error will be raised. 198 // an error will be raised.
196 static void getLogs(GetLogsCallback callback); 199 static void getLogs(GetLogsCallback callback);
200
201 // Sets trusted certificate authorities using multiple records in the
mark a. foltz 2014/10/09 17:57:20 Please update docstring to refer to the protobuf.
vadimgo 2014/10/09 23:31:55 Done.
202 // following format:
203 // fingerprint (20 bytes), public key size (2 bytes), public key
204 static void setAuthorityKeys(DOMString signature,
205 DOMString keys,
206 SetAuthorityKeysCallback callback);
197 }; 207 };
198 208
199 // Events on the channel. 209 // Events on the channel.
200 interface Events { 210 interface Events {
201 // Fired when a message is received on an open channel. 211 // Fired when a message is received on an open channel.
202 static void onMessage(ChannelInfo channel, 212 static void onMessage(ChannelInfo channel,
203 MessageInfo message); 213 MessageInfo message);
204 214
205 // Fired when an error occurs as a result of a channel operation or a 215 // Fired when an error occurs as a result of a channel operation or a
206 // network event. |error| contains details of the error. 216 // network event. |error| contains details of the error.
207 static void onError(ChannelInfo channel, ErrorInfo error); 217 static void onError(ChannelInfo channel, ErrorInfo error);
208 }; 218 };
209 }; 219 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698