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

Side by Side Diff: ppapi/shared_impl/ppb_audio_shared.h

Issue 10826296: Introduce shared_memory_support media target for PPAPI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 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
« no previous file with comments | « ppapi/ppapi_tests.gypi ('k') | ppapi/shared_impl/ppb_audio_shared.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) 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 PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "base/sync_socket.h" 10 #include "base/sync_socket.h"
(...skipping 11 matching lines...) Expand all
22 // Implements the logic to map shared memory and run the audio thread signaled 22 // Implements the logic to map shared memory and run the audio thread signaled
23 // from the sync socket. Both the proxy and the renderer implementation use 23 // from the sync socket. Both the proxy and the renderer implementation use
24 // this code. 24 // this code.
25 class PPAPI_SHARED_EXPORT PPB_Audio_Shared 25 class PPAPI_SHARED_EXPORT PPB_Audio_Shared
26 : public thunk::PPB_Audio_API, 26 : public thunk::PPB_Audio_API,
27 public base::DelegateSimpleThread::Delegate { 27 public base::DelegateSimpleThread::Delegate {
28 public: 28 public:
29 PPB_Audio_Shared(); 29 PPB_Audio_Shared();
30 virtual ~PPB_Audio_Shared(); 30 virtual ~PPB_Audio_Shared();
31 31
32 // Keep in sync with media::AudioOutputController::kPauseMark.
33 static const int kPauseMark;
34
35 bool playing() const { return playing_; } 32 bool playing() const { return playing_; }
36 33
37 // Sets the callback information that the background thread will use. This 34 // Sets the callback information that the background thread will use. This
38 // is optional. Without a callback, the thread will not be run. This 35 // is optional. Without a callback, the thread will not be run. This
39 // non-callback mode is used in the renderer with the proxy, since the proxy 36 // non-callback mode is used in the renderer with the proxy, since the proxy
40 // handles the callback entirely within the plugin process. 37 // handles the callback entirely within the plugin process.
41 void SetCallback(PPB_Audio_Callback callback, void* user_data); 38 void SetCallback(PPB_Audio_Callback callback, void* user_data);
42 39
43 // Configures the current state to be playing or not. The caller is 40 // Configures the current state to be playing or not. The caller is
44 // responsible for ensuring the new state is the opposite of the current one. 41 // responsible for ensuring the new state is the opposite of the current one.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 100
104 // User data pointer passed verbatim to the callback function. 101 // User data pointer passed verbatim to the callback function.
105 void* user_data_; 102 void* user_data_;
106 103
107 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared); 104 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared);
108 }; 105 };
109 106
110 } // namespace ppapi 107 } // namespace ppapi
111 108
112 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ 109 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_
OLDNEW
« no previous file with comments | « ppapi/ppapi_tests.gypi ('k') | ppapi/shared_impl/ppb_audio_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698