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

Side by Side Diff: ppapi/proxy/talk_resource.h

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: Implemented requested changes. 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 unified diff | Download patch
OLDNEW
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 #ifndef PPAPI_PROXY_TALK_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_TALK_RESOURCE_H_
6 #define PPAPI_PROXY_TALK_RESOURCE_H_ 6 #define PPAPI_PROXY_TALK_RESOURCE_H_
7 7
8 #include "ppapi/proxy/plugin_resource.h" 8 #include "ppapi/proxy/plugin_resource.h"
9 #include "ppapi/proxy/ppapi_proxy_export.h" 9 #include "ppapi/proxy/ppapi_proxy_export.h"
10 #include "ppapi/shared_impl/tracked_callback.h" 10 #include "ppapi/shared_impl/tracked_callback.h"
11 #include "ppapi/thunk/ppb_talk_private_api.h" 11 #include "ppapi/thunk/ppb_talk_private_api.h"
12 12
13 namespace ppapi { 13 namespace ppapi {
14 namespace proxy { 14 namespace proxy {
15 15
16 class PPAPI_PROXY_EXPORT TalkResource 16 class PPAPI_PROXY_EXPORT TalkResource
17 : public PluginResource, 17 : public PluginResource,
18 public NON_EXPORTED_BASE(thunk::PPB_Talk_Private_API) { 18 public NON_EXPORTED_BASE(thunk::PPB_Talk_Private_API) {
19 public: 19 public:
20 TalkResource(Connection connection, PP_Instance instance); 20 TalkResource(Connection connection, PP_Instance instance);
21 virtual ~TalkResource(); 21 virtual ~TalkResource();
22 22
23 // Resource overrides. 23 // Resource overrides.
24 thunk::PPB_Talk_Private_API* AsPPB_Talk_Private_API(); 24 thunk::PPB_Talk_Private_API* AsPPB_Talk_Private_API();
25 25
26 // PPB_Talk_API implementation. 26 // PPB_Talk_API implementation.
27 virtual int32_t GetPermission( 27 virtual int32_t RequestPermission(
28 PP_TalkPermission permission,
28 scoped_refptr<TrackedCallback> callback) OVERRIDE; 29 scoped_refptr<TrackedCallback> callback) OVERRIDE;
30 virtual int32_t StartRemoting(PP_TalkEventCallback event_callback,
31 void* user_data) OVERRIDE;
32 virtual void StopRemoting() OVERRIDE;
dmichael (off chromium) 2013/06/05 21:02:13 nit: These could probably all be private.
dcaiafa 2013/06/06 01:24:32 Done.
29 33
30 private: 34 private:
31 void GetPermissionReply(const ResourceMessageReplyParams& params); 35 // PluginResource override.
36 virtual void OnReplyReceived(const ResourceMessageReplyParams& params,
37 const IPC::Message& msg) OVERRIDE;
38
39 void OnNotifyEvent(const ResourceMessageReplyParams& params,
40 PP_TalkEvent event);
41 void OnRequestPermissionReply(const ResourceMessageReplyParams& params);
32 42
33 scoped_refptr<TrackedCallback> callback_; 43 scoped_refptr<TrackedCallback> callback_;
44 PP_TalkEventCallback event_callback_;
45 void* event_callback_user_data_;
34 46
35 DISALLOW_COPY_AND_ASSIGN(TalkResource); 47 DISALLOW_COPY_AND_ASSIGN(TalkResource);
36 }; 48 };
37 49
38 } // namespace proxy 50 } // namespace proxy
39 } // namespace ppapi 51 } // namespace ppapi
40 52
41 #endif // PPAPI_PROXY_TALK_RESOURCE_H_ 53 #endif // PPAPI_PROXY_TALK_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698