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

Side by Side Diff: content/renderer/pepper/pepper_audio_input_host.h

Issue 19744007: Create a public API around webkit::ppapi::PluginInstance and use it in chrome. After this, webkit/p… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and undo checkdeps change Created 7 years, 4 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 | Annotate | Revision Log
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 CONTENT_RENDERER_PEPPER_PEPPER_AUDIO_INPUT_HOST_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_AUDIO_INPUT_HOST_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_AUDIO_INPUT_HOST_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_AUDIO_INPUT_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/shared_memory.h" 13 #include "base/memory/shared_memory.h"
14 #include "base/sync_socket.h" 14 #include "base/sync_socket.h"
15 #include "content/renderer/pepper/pepper_device_enumeration_host_helper.h" 15 #include "content/renderer/pepper/pepper_device_enumeration_host_helper.h"
16 #include "ipc/ipc_platform_file.h" 16 #include "ipc/ipc_platform_file.h"
17 #include "ppapi/c/ppb_audio_config.h" 17 #include "ppapi/c/ppb_audio_config.h"
18 #include "ppapi/host/host_message_context.h" 18 #include "ppapi/host/host_message_context.h"
19 #include "ppapi/host/resource_host.h" 19 #include "ppapi/host/resource_host.h"
20 #include "webkit/plugins/ppapi/plugin_delegate.h" 20 #include "webkit/plugins/ppapi/plugin_delegate.h"
21 21
22 namespace content { 22 namespace content {
23 23
24 class RendererPpapiHost; 24 class RendererPpapiHostImpl;
25 25
26 class PepperAudioInputHost 26 class PepperAudioInputHost
27 : public ppapi::host::ResourceHost, 27 : public ppapi::host::ResourceHost,
28 public webkit::ppapi::PluginDelegate::PlatformAudioInputClient, 28 public webkit::ppapi::PluginDelegate::PlatformAudioInputClient,
29 public PepperDeviceEnumerationHostHelper::Delegate { 29 public PepperDeviceEnumerationHostHelper::Delegate {
30 public: 30 public:
31 PepperAudioInputHost(RendererPpapiHost* host, 31 PepperAudioInputHost(RendererPpapiHostImpl* host,
32 PP_Instance instance, 32 PP_Instance instance,
33 PP_Resource resource); 33 PP_Resource resource);
34 virtual ~PepperAudioInputHost(); 34 virtual ~PepperAudioInputHost();
35 35
36 virtual int32_t OnResourceMessageReceived( 36 virtual int32_t OnResourceMessageReceived(
37 const IPC::Message& msg, 37 const IPC::Message& msg,
38 ppapi::host::HostMessageContext* context) OVERRIDE; 38 ppapi::host::HostMessageContext* context) OVERRIDE;
39 39
40 // PluginDelegate::PlatformAudioInputClient implementation. 40 // PluginDelegate::PlatformAudioInputClient implementation.
41 virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, 41 virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle,
(...skipping 20 matching lines...) Expand all
62 62
63 int32_t GetRemoteHandles( 63 int32_t GetRemoteHandles(
64 const base::SyncSocket& socket, 64 const base::SyncSocket& socket,
65 const base::SharedMemory& shared_memory, 65 const base::SharedMemory& shared_memory,
66 IPC::PlatformFileForTransit* remote_socket_handle, 66 IPC::PlatformFileForTransit* remote_socket_handle,
67 base::SharedMemoryHandle* remote_shared_memory_handle); 67 base::SharedMemoryHandle* remote_shared_memory_handle);
68 68
69 void Close(); 69 void Close();
70 70
71 // Non-owning pointer. 71 // Non-owning pointer.
72 RendererPpapiHost* renderer_ppapi_host_; 72 RendererPpapiHostImpl* renderer_ppapi_host_;
73 73
74 scoped_ptr<ppapi::host::ReplyMessageContext> open_context_; 74 scoped_ptr<ppapi::host::ReplyMessageContext> open_context_;
75 75
76 // PluginDelegate audio input object that we delegate audio IPC through. 76 // PluginDelegate audio input object that we delegate audio IPC through.
77 // We don't own this pointer but are responsible for calling Shutdown on it. 77 // We don't own this pointer but are responsible for calling Shutdown on it.
78 webkit::ppapi::PluginDelegate::PlatformAudioInput* audio_input_; 78 webkit::ppapi::PluginDelegate::PlatformAudioInput* audio_input_;
79 79
80 PepperDeviceEnumerationHostHelper enumeration_helper_; 80 PepperDeviceEnumerationHostHelper enumeration_helper_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(PepperAudioInputHost); 82 DISALLOW_COPY_AND_ASSIGN(PepperAudioInputHost);
83 }; 83 };
84 84
85 } // namespace content 85 } // namespace content
86 86
87 #endif // CONTENT_RENDERER_PEPPER_PEPPER_AUDIO_INPUT_HOST_H_ 87 #endif // CONTENT_RENDERER_PEPPER_PEPPER_AUDIO_INPUT_HOST_H_
OLDNEW
« no previous file with comments | « content/renderer/media/crypto/ppapi_decryptor.cc ('k') | content/renderer/pepper/pepper_audio_input_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698