OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_DEVICE_CONTEXT_AUDIO_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_DEVICE_CONTEXT_AUDIO_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_DEVICE_CONTEXT_AUDIO_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_DEVICE_CONTEXT_AUDIO_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 private: | 75 private: |
76 // PluginDelegate::PlatformAudio::Client implementation. | 76 // PluginDelegate::PlatformAudio::Client implementation. |
77 virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, | 77 virtual void StreamCreated(base::SharedMemoryHandle shared_memory_handle, |
78 size_t shared_memory_size_, | 78 size_t shared_memory_size_, |
79 base::SyncSocket::Handle socket); | 79 base::SyncSocket::Handle socket); |
80 | 80 |
81 // AudioConfig used for creating this Audio object. | 81 // AudioConfig used for creating this Audio object. |
82 scoped_refptr<PPB_AudioConfig_Impl> config_; | 82 scoped_refptr<PPB_AudioConfig_Impl> config_; |
83 | 83 |
84 // PluginDelegate audio object that we delegate audio IPC through. | 84 // PluginDelegate audio object that we delegate audio IPC through. We don't |
| 85 // own this pointer but are responsible for calling Shutdown on it. |
85 PluginDelegate::PlatformAudio* audio_; | 86 PluginDelegate::PlatformAudio* audio_; |
86 | 87 |
87 // Is a create callback pending to fire? | 88 // Is a create callback pending to fire? |
88 bool create_callback_pending_; | 89 bool create_callback_pending_; |
89 | 90 |
90 // Trusted callback invoked from StreamCreated. | 91 // Trusted callback invoked from StreamCreated. |
91 PP_CompletionCallback create_callback_; | 92 PP_CompletionCallback create_callback_; |
92 | 93 |
93 // When a create callback is being issued, these will save the info for | 94 // When a create callback is being issued, these will save the info for |
94 // querying from the callback. The proxy uses this to get the handles to the | 95 // querying from the callback. The proxy uses this to get the handles to the |
95 // other process instead of mapping them in the renderer. These will be | 96 // other process instead of mapping them in the renderer. These will be |
96 // invalid all other times. | 97 // invalid all other times. |
97 scoped_ptr<base::SharedMemory> shared_memory_for_create_callback_; | 98 scoped_ptr<base::SharedMemory> shared_memory_for_create_callback_; |
98 size_t shared_memory_size_for_create_callback_; | 99 size_t shared_memory_size_for_create_callback_; |
99 scoped_ptr<base::SyncSocket> socket_for_create_callback_; | 100 scoped_ptr<base::SyncSocket> socket_for_create_callback_; |
100 | 101 |
101 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); | 102 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); |
102 }; | 103 }; |
103 | 104 |
104 } // namespace ppapi | 105 } // namespace ppapi |
105 } // namespace webkit | 106 } // namespace webkit |
106 | 107 |
107 #endif // WEBKIT_PLUGINS_PPAPI_DEVICE_CONTEXT_AUDIO_H_ | 108 #endif // WEBKIT_PLUGINS_PPAPI_DEVICE_CONTEXT_AUDIO_H_ |
OLD | NEW |