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

Unified Diff: ppapi/thunk/ppb_talk_private_thunk.cc

Issue 16271005: Implement pepper interface and plumbing for HRD's UI on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't use IPC::Message::Schema::Read in unittest - build break Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_talk_private_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_talk_private_thunk.cc
diff --git a/ppapi/thunk/ppb_talk_private_thunk.cc b/ppapi/thunk/ppb_talk_private_thunk.cc
index b930d24e93aeaa84de037d7c3dd6031a06856994..6d2325de6eb11406d306df473feba70ef73274a7 100644
--- a/ppapi/thunk/ppb_talk_private_thunk.cc
+++ b/ppapi/thunk/ppb_talk_private_thunk.cc
@@ -26,18 +26,61 @@ int32_t GetPermission(PP_Resource resource,
EnterResource<PPB_Talk_Private_API> enter(resource, callback, true);
if (enter.failed())
return PP_ERROR_BADRESOURCE;
- return enter.SetResult(enter.object()->GetPermission(enter.callback()));
+ return enter.SetResult(enter.object()->RequestPermission(
+ PP_TALKPERMISSION_SCREENCAST, enter.callback()));
}
-const PPB_Talk_Private_1_0 g_ppb_talk_private_thunk = {
+int32_t RequestPermission(PP_Resource resource,
+ PP_TalkPermission permission,
+ PP_CompletionCallback callback) {
+ EnterResource<PPB_Talk_Private_API> enter(resource, callback, true);
+ if (enter.failed())
+ return PP_ERROR_BADRESOURCE;
+ return enter.SetResult(
+ enter.object()->RequestPermission(permission, enter.callback()));
+}
+
+int32_t StartRemoting(PP_Resource resource,
+ PP_TalkEventCallback event_callback,
+ void* user_data,
+ PP_CompletionCallback callback) {
+ EnterResource<PPB_Talk_Private_API> enter(resource, callback, true);
+ if (enter.failed())
+ return PP_ERROR_BADRESOURCE;
+ return enter.SetResult(
+ enter.object()->StartRemoting(event_callback, user_data,
+ enter.callback()));
+}
+
+int32_t StopRemoting(PP_Resource resource,
+ PP_CompletionCallback callback) {
+ EnterResource<PPB_Talk_Private_API> enter(resource, callback, true);
+ if (enter.failed())
+ return PP_ERROR_BADRESOURCE;
+ return enter.SetResult(
+ enter.object()->StopRemoting(enter.callback()));
+}
+
+const PPB_Talk_Private_1_0 g_ppb_talk_private_thunk_1_0 = {
&Create,
&GetPermission
};
+const PPB_Talk_Private_2_0 g_ppb_talk_private_thunk_2_0 = {
+ &Create,
+ &RequestPermission,
+ &StartRemoting,
+ &StopRemoting
+};
+
} // namespace
const PPB_Talk_Private_1_0* GetPPB_Talk_Private_1_0_Thunk() {
- return &g_ppb_talk_private_thunk;
+ return &g_ppb_talk_private_thunk_1_0;
+}
+
+const PPB_Talk_Private_2_0* GetPPB_Talk_Private_2_0_Thunk() {
+ return &g_ppb_talk_private_thunk_2_0;
}
} // namespace thunk
« no previous file with comments | « ppapi/thunk/ppb_talk_private_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698