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

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

Issue 8138008: Implementation of ppapi audio. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
Property Changes:
Added: svn:executable
+ *
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_PLUGINS_PPAPI_AUDIO_HELPER_H_
6 #define WEBKIT_PLUGINS_PPAPI_AUDIO_HELPER_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/shared_memory.h"
11 #include "base/sync_socket.h"
12 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/shared_impl/scoped_pp_resource.h"
14 #include "ppapi/shared_impl/resource.h"
15 #include "webkit/plugins/ppapi/plugin_delegate.h"
16 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
17
18 namespace webkit {
19 namespace ppapi {
20
21 class AudioHelper {
22 public:
23 explicit AudioHelper();
viettrungluu 2011/11/08 00:41:54 No |explicit|.
24
25 virtual ~AudioHelper();
26
27 virtual int32_t GetSyncSocket(int* sync_socket) OVERRIDE;
viettrungluu 2011/11/08 00:41:54 No OVERRIDEs.
28 virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) OVERRIDE;
29
30 virtual void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle,
31 size_t shared_memory_size,
32 base::SyncSocket::Handle socket_handle) = 0;
33
34 void StreamCreated_(base::SharedMemoryHandle shared_memory_handle,
35 size_t shared_memory_size_,
36 base::SyncSocket::Handle socket);
37
38 void SetCallbackInfo(bool create_callback_pending,
39 PP_CompletionCallback create_callback);
40
41 private:
viettrungluu 2011/11/08 00:41:54 indentation
42 // Is a create callback pending to fire?
43 bool create_callback_pending_;
44
45 // Trusted callback invoked from StreamCreated.
46 PP_CompletionCallback create_callback_;
47
48 // When a create callback is being issued, these will save the info for
49 // querying from the callback. The proxy uses this to get the handles to the
50 // other process instead of mapping them in the renderer. These will be
51 // invalid all other times.
52 scoped_ptr<base::SharedMemory> shared_memory_for_create_callback_;
53 size_t shared_memory_size_for_create_callback_;
54 scoped_ptr<base::SyncSocket> socket_for_create_callback_;
55
56 DISALLOW_COPY_AND_ASSIGN(AudioHelper);
57 };
58
59 } // namespace ppapi
60 } // namespace webkit
61
62 #endif // WEBKIT_PLUGINS_PPAPI_AUDIO_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698