Chromium Code Reviews| Index: ppapi/api/private/ppb_talk_private.idl |
| diff --git a/ppapi/api/private/ppb_talk_private.idl b/ppapi/api/private/ppb_talk_private.idl |
| index 8422fe0ad9cad06551e11c84ee7431c3dddc79cb..35709f79a25bd6cf4fff63e5e1ad1d8620e8c3cc 100644 |
| --- a/ppapi/api/private/ppb_talk_private.idl |
| +++ b/ppapi/api/private/ppb_talk_private.idl |
| @@ -4,23 +4,65 @@ |
| */ |
| /** |
| - * This file contains the <code>PPB_Talk</code> interface. |
| + * This file contains the <code>PPB_Talk_Private</code> interface. |
| */ |
| label Chrome { |
| - M19 = 1.0 |
| + M19 = 1.0, |
| + M29 = 2.0 |
| }; |
| /** |
| + * The type of permissions that can be requested from the user. |
| + */ |
| +[assert_size(4)] |
| +enum PP_TalkPermission { |
| + /** |
| + * Request permission for screencast. |
| + */ |
| + PP_TALKPERMISSION_SCREENCAST = 0, |
| + /** |
| + * Request permission for Remote Desktop. |
| + */ |
| + PP_TALKPERMISSION_REMOTING = 1, |
| + /** |
| + * Request permission for continuing Remote Desktop. |
| + */ |
| + PP_TALKPERMISSION_REMOTING_CONTINUE = 2 |
| +}; |
| + |
| +/** |
| + * Talk event types reported by the browser. |
| + */ |
| +[assert_size(4)] |
| +enum PP_TalkEvent { |
| + /** |
| + * Indicates that the user took action to terminate the remoting session. |
| + */ |
| + PP_TALKEVENT_TERMINATE = 0, |
| + /** |
| + * Indicates that an error occurred (e.g. failed to show the UI). |
| + */ |
| + PP_TALKEVENT_ERROR = 1 |
| +}; |
| + |
| +/** |
| + * Callback for Talk events. |
| + */ |
| +typedef void PP_TalkEventCallback([inout] mem_t user_data, |
| + [in] PP_TalkEvent event); |
| + |
| +/** |
| * Extra interface for Talk. |
| */ |
| interface PPB_Talk_Private { |
| /** |
| * Creates a Talk_Private resource. |
| */ |
| + [version=1.0] |
| PP_Resource Create(PP_Instance instance); |
| /** |
| - * Displays security UI. |
| + * Displays confirmation dialog for screencasting. |
| * |
| * The callback will be issued with 1 as the result if the user gave |
| * permission, or 0 if the user denied. |
| @@ -28,8 +70,54 @@ interface PPB_Talk_Private { |
| * You can only have one call pending. It will return PP_OK_COMPLETIONPENDING |
| * if the request is queued, or PP_ERROR_INPROGRESS if there is already a |
| * request in progress. |
| + * |
| + * (Deprecated in 2.0. Please us RequestPermission instead.) |
| */ |
| + [version=1.0, deprecate=2.0] |
| int32_t GetPermission( |
| [in] PP_Resource talk_resource, |
| [in] PP_CompletionCallback callback); |
| + |
| + /** |
| + * Requests permission from the user using a system modal dialog. |
| + * |
| + * <code>permission</code> specifies the type of permission to request from |
| + * the user. |
| + * |
| + * The callback will be issued with 1 as the result if the user gave |
| + * permission, or 0 if the user denied. |
|
dmichael (off chromium)
2013/06/05 02:11:11
0 is PP_OK, which usually means success. Since you
dcaiafa
2013/06/05 18:49:32
It would make things more complicated on both side
|
| + * |
| + * You can only have one call pending. It will return PP_OK_COMPLETIONPENDING |
| + * if the request is queued, or PP_ERROR_INPROGRESS if there is already a |
| + * request in progress. |
| + */ |
| + [version=2.0] |
| + int32_t RequestPermission( |
| + [in] PP_Resource talk_resource, |
| + [in] PP_TalkPermission permission, |
| + [in] PP_CompletionCallback callback); |
| + |
| + /** |
| + * Shows the remoting-in-progress UI and registers a callback for events. |
| + * This function executes synchronously. Returns PP_OK if there were no |
|
dmichael (off chromium)
2013/06/05 02:11:11
Do you mean asynchronously?
dcaiafa
2013/06/05 18:49:32
I do mean synchronously. This API shows the in-ses
dmichael (off chromium)
2013/06/05 21:02:13
Can you clarify what you mean by "synchronously",
dcaiafa
2013/06/06 01:24:32
You are right, it is confusing. I decided to make
|
| + * errors. |
| + * |
| + * This must be called on the pepper main thread. Similarly, |event_callback| |
| + * will be called on the pepper main thread. |
| + */ |
| + [version=2.0] |
| + int32_t StartRemoting( |
| + [in] PP_Resource talk_resource, |
| + [in] PP_TalkEventCallback event_callback, |
|
dmichael (off chromium)
2013/06/05 02:11:11
Is there some reason you can't use PP_CompletionCa
dcaiafa
2013/06/05 18:49:32
It can be called more than once, although in pract
|
| + [inout] mem_t user_data); |
| + |
| + /** |
| + * Hides the remoting-in-progress UI and unregisters the event callback. |
| + * |
| + * This must be called on the pepper main thread. Any pending notifications |
| + * will be discarded. |
| + */ |
| + [version=2.0] |
| + void StopRemoting( |
| + [in] PP_Resource talk_resource); |
| }; |