Use ExtensionRegistry::enabled_extensions instead of deprecated ExtensionService...
[chromium-blink-merge.git] / ppapi / api / private / ppb_talk_private.idl
blob548ac1eeba8c3fdd05a36ca817503551ead74257
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
3 * found in the LICENSE file.
4 */
6 /**
7 * This file contains the <code>PPB_Talk_Private</code> interface.
8 */
9 label Chrome {
10 M19 = 1.0,
11 M29 = 2.0
14 /**
15 * The type of permissions that can be requested from the user.
17 [assert_size(4)]
18 enum PP_TalkPermission {
19 /**
20 * Request permission for screencast.
22 PP_TALKPERMISSION_SCREENCAST,
23 /**
24 * Request permission for Remote Desktop.
26 PP_TALKPERMISSION_REMOTING,
27 /**
28 * Request permission for continuing Remote Desktop.
30 PP_TALKPERMISSION_REMOTING_CONTINUE,
31 /**
32 * Number of permissions.
34 PP_TALKPERMISSION_NUM_PERMISSIONS
37 /**
38 * Talk event types reported by the browser.
40 [assert_size(4)]
41 enum PP_TalkEvent {
42 /**
43 * Indicates that the user took action to terminate the remoting session.
45 PP_TALKEVENT_TERMINATE,
46 /**
47 * Indicates that an error occurred (e.g. failed to show the UI).
49 PP_TALKEVENT_ERROR,
50 /**
51 * Number of events
53 PP_TALKEVENT_NUM_EVENTS
56 /**
57 * Callback for Talk events.
59 typedef void PP_TalkEventCallback([inout] mem_t user_data,
60 [in] PP_TalkEvent event);
62 /**
63 * Extra interface for Talk.
65 interface PPB_Talk_Private {
66 /**
67 * Creates a Talk_Private resource.
69 [version=1.0]
70 PP_Resource Create(PP_Instance instance);
72 /**
73 * Displays confirmation dialog for screencasting.
75 * The callback will be issued with 1 as the result if the user gave
76 * permission, or 0 if the user denied.
78 * You can only have one call pending. It will return PP_OK_COMPLETIONPENDING
79 * if the request is queued, or PP_ERROR_INPROGRESS if there is already a
80 * request in progress.
82 * (Deprecated in 2.0. Please us RequestPermission instead.)
84 [version=1.0, deprecate=2.0]
85 int32_t GetPermission(
86 [in] PP_Resource talk_resource,
87 [in] PP_CompletionCallback callback);
89 /**
90 * Requests permission from the user using a system modal dialog.
92 * <code>permission</code> specifies the type of permission to request from
93 * the user.
95 * <code>callback</code> is the completion callback. It will be issued with 1
96 * as the result if the user gave permission, or 0 if the user denied.
98 * You can only have one call pending. It will return PP_OK_COMPLETIONPENDING
99 * if the request is queued, or PP_ERROR_INPROGRESS if there is already a
100 * request in progress.
102 [version=2.0]
103 int32_t RequestPermission(
104 [in] PP_Resource talk_resource,
105 [in] PP_TalkPermission permission,
106 [in] PP_CompletionCallback callback);
109 * Shows the remoting-in-progress UI and registers a callback for events.
111 * <code>event_callback</code> is the callback for session releated events.
112 * It will only start receiving events after the completion callback has been
113 * issued. This callback will be called on the pepper main thread.
115 * <code>user_data</code> is an opaque value used when
116 * <code>event_callback</code> is invoked.
118 * <code>callback</code> is the completion callback.
120 * You can only have one call pending. It will return PP_OK_COMPLETIONPENDING
121 * if the request is queued, or PP_ERROR_INPROGRESS if there is already a
122 * request in progress. PP_ERROR_INPROGRESS will also be returned if a
123 * previous call to StartRemoting succeeded without a corresponding
124 * StopRemoting call.
126 [version=2.0]
127 int32_t StartRemoting(
128 [in] PP_Resource talk_resource,
129 [in] PP_TalkEventCallback event_callback,
130 [inout] mem_t user_data,
131 [in] PP_CompletionCallback callback);
134 * Hides the remoting-in-progress UI and unregisters the event callback.
136 * <code>callback</code> is the completion callback.
138 [version=2.0]
139 int32_t StopRemoting(
140 [in] PP_Resource talk_resource,
141 [in] PP_CompletionCallback callback);