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 #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TALK_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TALK_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TALK_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TALK_HOST_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "ppapi/c/private/ppb_talk_private.h" |
9 #include "ppapi/host/resource_host.h" | 10 #include "ppapi/host/resource_host.h" |
10 #include "ppapi/proxy/resource_message_params.h" | 11 #include "ppapi/proxy/resource_message_params.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 class BrowserPpapiHost; | 14 class BrowserPpapiHost; |
14 } | 15 } |
15 | 16 |
16 namespace ppapi { | 17 namespace ppapi { |
17 namespace host { | 18 namespace host { |
18 struct ReplyMessageContext; | 19 struct ReplyMessageContext; |
(...skipping 11 matching lines...) Expand all Loading... |
30 | 31 |
31 // ResourceHost override. | 32 // ResourceHost override. |
32 virtual int32_t OnResourceMessageReceived( | 33 virtual int32_t OnResourceMessageReceived( |
33 const IPC::Message& msg, | 34 const IPC::Message& msg, |
34 ppapi::host::HostMessageContext* context) OVERRIDE; | 35 ppapi::host::HostMessageContext* context) OVERRIDE; |
35 | 36 |
36 // Sends the reply. | 37 // Sends the reply. |
37 void GotTalkPermission(ppapi::host::ReplyMessageContext reply); | 38 void GotTalkPermission(ppapi::host::ReplyMessageContext reply); |
38 | 39 |
39 private: | 40 private: |
| 41 int32_t OnRequestPermission( |
| 42 ppapi::host::HostMessageContext* context, |
| 43 PP_TalkPermission permission); |
| 44 int32_t OnStartRemoting( |
| 45 ppapi::host::HostMessageContext* context); |
| 46 int32_t OnStopRemoting( |
| 47 ppapi::host::HostMessageContext* context); |
| 48 |
40 base::WeakPtrFactory<PepperTalkHost> weak_factory_; | 49 base::WeakPtrFactory<PepperTalkHost> weak_factory_; |
41 content::BrowserPpapiHost* browser_ppapi_host_; | 50 content::BrowserPpapiHost* browser_ppapi_host_; |
42 | 51 |
43 DISALLOW_COPY_AND_ASSIGN(PepperTalkHost); | 52 DISALLOW_COPY_AND_ASSIGN(PepperTalkHost); |
44 }; | 53 }; |
45 | 54 |
46 } // namespace chrome | 55 } // namespace chrome |
47 | 56 |
48 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TALK_HOST_H_ | 57 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TALK_HOST_H_ |
OLD | NEW |