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

Side by Side Diff: webkit/plugins/ppapi/ppb_audio_impl.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export AssertLockHeld Created 8 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/plugins/ppapi/ppb_audio_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
11 #include "base/sync_socket.h" 11 #include "base/sync_socket.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 PPB_Audio_Callback user_callback, 50 PPB_Audio_Callback user_callback,
51 void* user_data); 51 void* user_data);
52 52
53 // Resource overrides. 53 // Resource overrides.
54 virtual ::ppapi::thunk::PPB_Audio_API* AsPPB_Audio_API(); 54 virtual ::ppapi::thunk::PPB_Audio_API* AsPPB_Audio_API();
55 55
56 // PPB_Audio_API implementation. 56 // PPB_Audio_API implementation.
57 virtual PP_Resource GetCurrentConfig() OVERRIDE; 57 virtual PP_Resource GetCurrentConfig() OVERRIDE;
58 virtual PP_Bool StartPlayback() OVERRIDE; 58 virtual PP_Bool StartPlayback() OVERRIDE;
59 virtual PP_Bool StopPlayback() OVERRIDE; 59 virtual PP_Bool StopPlayback() OVERRIDE;
60 virtual int32_t OpenTrusted(PP_Resource config_id, 60 virtual int32_t OpenTrusted(
61 PP_CompletionCallback create_callback) OVERRIDE; 61 PP_Resource config_id,
62 scoped_refptr< ::ppapi::TrackedCallback> create_callback) OVERRIDE;
62 virtual int32_t GetSyncSocket(int* sync_socket) OVERRIDE; 63 virtual int32_t GetSyncSocket(int* sync_socket) OVERRIDE;
63 virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) OVERRIDE; 64 virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) OVERRIDE;
64 65
65 private: 66 private:
66 // AudioHelper implementation. 67 // AudioHelper implementation.
67 virtual void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle, 68 virtual void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle,
68 size_t shared_memory_size_, 69 size_t shared_memory_size_,
69 base::SyncSocket::Handle socket); 70 base::SyncSocket::Handle socket);
70 71
71 // AudioConfig used for creating this Audio object. We own a ref. 72 // AudioConfig used for creating this Audio object. We own a ref.
72 ::ppapi::ScopedPPResource config_; 73 ::ppapi::ScopedPPResource config_;
73 74
74 // PluginDelegate audio object that we delegate audio IPC through. We don't 75 // PluginDelegate audio object that we delegate audio IPC through. We don't
75 // own this pointer but are responsible for calling Shutdown on it. 76 // own this pointer but are responsible for calling Shutdown on it.
76 PluginDelegate::PlatformAudioOutput* audio_; 77 PluginDelegate::PlatformAudioOutput* audio_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); 79 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl);
79 }; 80 };
80 81
81 } // namespace ppapi 82 } // namespace ppapi
82 } // namespace webkit 83 } // namespace webkit
83 84
84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ 85 #endif // WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/plugins/ppapi/ppb_audio_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698