Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 | 5 |
| 6 /** | 6 /** |
| 7 * This file contains the <code>PPB_Talk</code> interface. | 7 * This file contains the <code>PPB_Talk_Private</code> interface. |
| 8 */ | 8 */ |
| 9 label Chrome { | 9 label Chrome { |
| 10 M19 = 1.0 | 10 M19 = 1.0, |
| 11 M29 = 2.0 | |
| 11 }; | 12 }; |
| 12 | 13 |
| 13 /** | 14 /** |
| 15 * The type of permissions that can be requested to the user. | |
| 16 */ | |
| 17 [assert_size(4)] | |
| 18 enum PP_TalkPermission { | |
| 19 /** | |
| 20 * Request permission for screencast. | |
| 21 */ | |
| 22 PP_TALKPERMISSION_SCREENCAST = 0, | |
| 23 /** | |
| 24 * Request permission for Remote Desktop. | |
| 25 */ | |
| 26 PP_TALKPERMISSION_REMOTING = 1, | |
| 27 /** | |
| 28 * Request permission for continuing Remote Desktop. | |
| 29 */ | |
| 30 PP_TALKPERMISSION_REMOTING_CONTINUE = 2 | |
| 31 }; | |
| 32 | |
| 33 /** | |
| 34 * Talk event types reported by the browser. | |
| 35 */ | |
| 36 [assert_size(4)] | |
| 37 enum PP_TalkEvent { | |
| 38 /** | |
| 39 * Indicates that the user took action to terminate the remoting session. | |
| 40 */ | |
| 41 PP_TALKEVENT_TERMINATE = 0, | |
| 42 /** | |
| 43 * Indicates that an error occurred (e.g. failed to show the UI). | |
| 44 */ | |
| 45 PP_TALKEVENT_ERROR = 1 | |
| 46 }; | |
| 47 | |
| 48 /** | |
| 49 * Callback for Talk events. | |
| 50 */ | |
| 51 typedef void PP_TalkEventCallback([inout] mem_t user_data, | |
| 52 [in] PP_TalkEvent event); | |
| 53 | |
| 54 /** | |
| 14 * Extra interface for Talk. | 55 * Extra interface for Talk. |
| 15 */ | 56 */ |
| 16 interface PPB_Talk_Private { | 57 interface PPB_Talk_Private { |
| 17 /** | 58 /** |
| 18 * Creates a Talk_Private resource. | 59 * Creates a Talk_Private resource. |
| 19 */ | 60 */ |
| 61 [version=1.0] | |
| 20 PP_Resource Create(PP_Instance instance); | 62 PP_Resource Create(PP_Instance instance); |
| 21 | 63 |
| 22 /** | 64 /** |
| 23 * Displays security UI. | 65 * Displays confirmation dialog for screencasting. |
| 24 * | 66 * |
| 25 * The callback will be issued with 1 as the result if the user gave | 67 * The callback will be issued with 1 as the result if the user gave |
| 26 * permission, or 0 if the user denied. | 68 * permission, or 0 if the user denied. |
| 27 * | 69 * |
| 28 * You can only have one call pending. It will return PP_OK_COMPLETIONPENDING | 70 * You can only have one call pending. It will return PP_OK_COMPLETIONPENDING |
| 29 * if the request is queued, or PP_ERROR_INPROGRESS if there is already a | 71 * if the request is queued, or PP_ERROR_INPROGRESS if there is already a |
| 30 * request in progress. | 72 * request in progress. |
| 73 * | |
| 74 * (Deprecated in 2.0. Please us RequestPermission instead.) | |
| 75 */ | |
| 76 [version=1.0, deprecate=2.0] | |
| 77 int32_t GetPermission( | |
| 78 [in] PP_Resource talk_resource, | |
| 79 [in] PP_CompletionCallback callback); | |
| 80 | |
| 81 /** | |
| 82 * Requests permission to the user using a system modal dialog. | |
|
Josh Horwich
2013/06/04 19:48:37
I believe it's clearer to say "Requests permission
dcaiafa
2013/06/04 22:38:15
Done.
| |
| 83 * | |
| 84 * <code>permission</code> specifies the type of permission to request to the | |
| 85 * user. | |
| 86 * | |
| 87 * The callback will be issued with 1 as the result if the user gave | |
| 88 * permission, or 0 if the user denied. | |
| 89 * | |
| 90 * You can only have one call pending. It will return PP_OK_COMPLETIONPENDING | |
| 91 * if the request is queued, or PP_ERROR_INPROGRESS if there is already a | |
| 92 * request in progress. | |
| 31 */ | 93 */ |
| 32 int32_t GetPermission( | 94 [version=2.0] |
| 95 int32_t RequestPermission( | |
| 33 [in] PP_Resource talk_resource, | 96 [in] PP_Resource talk_resource, |
| 97 [in] PP_TalkPermission permission, | |
| 34 [in] PP_CompletionCallback callback); | 98 [in] PP_CompletionCallback callback); |
| 99 | |
| 100 /** | |
| 101 * Shows the remoting-in-progress UI and registers a callback for events. | |
| 102 * This function executes synchronously. Returns PP_OK if there were no | |
| 103 * errors. | |
| 104 * | |
| 105 * This must be called on the pepper main thread. Similarly, |event_callback| | |
| 106 * will be called on the pepper main thread. | |
| 107 */ | |
| 108 [version=2.0] | |
| 109 int32_t StartRemoting( | |
| 110 [in] PP_Resource talk_resource, | |
| 111 [in] PP_TalkEventCallback event_callback, | |
| 112 [inout] mem_t user_data); | |
| 113 | |
| 114 /** | |
| 115 * Hides the remoting-in-progress UI and unregisters the event callback. | |
| 116 * | |
| 117 * This must be called on the pepper main thread. Any pending notifications | |
| 118 * will be discarded. | |
| 119 */ | |
| 120 [version=2.0] | |
| 121 void StopRemoting( | |
| 122 [in] PP_Resource talk_resource); | |
| 35 }; | 123 }; |
| OLD | NEW |