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

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

Issue 1154613006: Update pepper to not assume that SharedMemoryHandle is an int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another nits pass. Created 5 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
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_AUDIO_HELPER_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_AUDIO_HELPER_H_
6 #define CONTENT_RENDERER_PEPPER_AUDIO_HELPER_H_ 6 #define CONTENT_RENDERER_PEPPER_AUDIO_HELPER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 15 matching lines...) Expand all
26 size_t shared_memory_size_, 26 size_t shared_memory_size_,
27 base::SyncSocket::Handle socket); 27 base::SyncSocket::Handle socket);
28 28
29 void SetCreateCallback(scoped_refptr<ppapi::TrackedCallback> create_callback); 29 void SetCreateCallback(scoped_refptr<ppapi::TrackedCallback> create_callback);
30 30
31 protected: 31 protected:
32 // TODO(viettrungluu): This is all very poorly thought out. Refactor. 32 // TODO(viettrungluu): This is all very poorly thought out. Refactor.
33 33
34 // To be called by implementations of |PPB_Audio_API|/|PPB_AudioInput_API|. 34 // To be called by implementations of |PPB_Audio_API|/|PPB_AudioInput_API|.
35 int32_t GetSyncSocketImpl(int* sync_socket); 35 int32_t GetSyncSocketImpl(int* sync_socket);
36 int32_t GetSharedMemoryImpl(int* shm_handle, uint32_t* shm_size); 36 int32_t GetSharedMemoryImpl(base::SharedMemory** shm, uint32_t* shm_size);
37 37
38 // To be implemented by subclasses to call their |SetStreamInfo()|. 38 // To be implemented by subclasses to call their |SetStreamInfo()|.
39 virtual void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle, 39 virtual void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle,
40 size_t shared_memory_size, 40 size_t shared_memory_size,
41 base::SyncSocket::Handle socket_handle) = 0; 41 base::SyncSocket::Handle socket_handle) = 0;
42 42
43 private: 43 private:
44 scoped_refptr<ppapi::TrackedCallback> create_callback_; 44 scoped_refptr<ppapi::TrackedCallback> create_callback_;
45 45
46 // When a create callback is being issued, these will save the info for 46 // When a create callback is being issued, these will save the info for
47 // querying from the callback. The proxy uses this to get the handles to the 47 // querying from the callback. The proxy uses this to get the handles to the
48 // other process instead of mapping them in the renderer. These will be 48 // other process instead of mapping them in the renderer. These will be
49 // invalid all other times. 49 // invalid all other times.
50 scoped_ptr<base::SharedMemory> shared_memory_for_create_callback_; 50 scoped_ptr<base::SharedMemory> shared_memory_for_create_callback_;
51 size_t shared_memory_size_for_create_callback_; 51 size_t shared_memory_size_for_create_callback_;
52 scoped_ptr<base::SyncSocket> socket_for_create_callback_; 52 scoped_ptr<base::SyncSocket> socket_for_create_callback_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(AudioHelper); 54 DISALLOW_COPY_AND_ASSIGN(AudioHelper);
55 }; 55 };
56 56
57 } // namespace content 57 } // namespace content
58 58
59 #endif // CONTENT_RENDERER_PEPPER_AUDIO_HELPER_H_ 59 #endif // CONTENT_RENDERER_PEPPER_AUDIO_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698