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

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

Issue 10837064: Corresponding change in Pepper since EnumerateDevices contract is changed. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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
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_INPUT_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 24 matching lines...) Expand all
35 explicit PPB_AudioInput_Shared(PP_Instance instance); 35 explicit PPB_AudioInput_Shared(PP_Instance instance);
36 virtual ~PPB_AudioInput_Shared(); 36 virtual ~PPB_AudioInput_Shared();
37 37
38 // Resource overrides. 38 // Resource overrides.
39 virtual thunk::PPB_AudioInput_API* AsPPB_AudioInput_API() OVERRIDE; 39 virtual thunk::PPB_AudioInput_API* AsPPB_AudioInput_API() OVERRIDE;
40 40
41 // Implementation of PPB_AudioInput_API non-trusted methods. 41 // Implementation of PPB_AudioInput_API non-trusted methods.
42 virtual int32_t EnumerateDevices( 42 virtual int32_t EnumerateDevices(
43 PP_Resource* devices, 43 PP_Resource* devices,
44 scoped_refptr<TrackedCallback> callback) OVERRIDE; 44 scoped_refptr<TrackedCallback> callback) OVERRIDE;
45 virtual int32_t StopEnumerateDevices(PP_Resource* devices) OVERRIDE;
45 virtual int32_t Open(const std::string& device_id, 46 virtual int32_t Open(const std::string& device_id,
46 PP_Resource config, 47 PP_Resource config,
47 PPB_AudioInput_Callback audio_input_callback, 48 PPB_AudioInput_Callback audio_input_callback,
48 void* user_data, 49 void* user_data,
49 scoped_refptr<TrackedCallback> callback) OVERRIDE; 50 scoped_refptr<TrackedCallback> callback) OVERRIDE;
50 virtual PP_Resource GetCurrentConfig() OVERRIDE; 51 virtual PP_Resource GetCurrentConfig() OVERRIDE;
51 virtual PP_Bool StartCapture() OVERRIDE; 52 virtual PP_Bool StartCapture() OVERRIDE;
52 virtual PP_Bool StopCapture() OVERRIDE; 53 virtual PP_Bool StopCapture() OVERRIDE;
53 virtual void Close() OVERRIDE; 54 virtual void Close() OVERRIDE;
54 55
(...skipping 12 matching lines...) Expand all
67 BEFORE_OPEN, 68 BEFORE_OPEN,
68 OPENED, 69 OPENED,
69 CLOSED 70 CLOSED
70 }; 71 };
71 72
72 // Subclasses should implement these methods to do impl- and proxy-specific 73 // Subclasses should implement these methods to do impl- and proxy-specific
73 // work. 74 // work.
74 virtual int32_t InternalEnumerateDevices( 75 virtual int32_t InternalEnumerateDevices(
75 PP_Resource* devices, 76 PP_Resource* devices,
76 scoped_refptr<TrackedCallback> callback) = 0; 77 scoped_refptr<TrackedCallback> callback) = 0;
78 virtual int32_t InternalStopEnumerateDevices(PP_Resource* devices) = 0;
77 virtual int32_t InternalOpen(const std::string& device_id, 79 virtual int32_t InternalOpen(const std::string& device_id,
78 PP_AudioSampleRate sample_rate, 80 PP_AudioSampleRate sample_rate,
79 uint32_t sample_frame_count, 81 uint32_t sample_frame_count,
80 scoped_refptr<TrackedCallback> callback) = 0; 82 scoped_refptr<TrackedCallback> callback) = 0;
81 virtual PP_Bool InternalStartCapture() = 0; 83 virtual PP_Bool InternalStartCapture() = 0;
82 virtual PP_Bool InternalStopCapture() = 0; 84 virtual PP_Bool InternalStopCapture() = 0;
83 virtual void InternalClose() = 0; 85 virtual void InternalClose() = 0;
84 86
85 // Configures the current state to be capturing or not. The caller is 87 // Configures the current state to be capturing or not. The caller is
86 // responsible for ensuring the new state is the opposite of the current one. 88 // responsible for ensuring the new state is the opposite of the current one.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void* user_data_; 150 void* user_data_;
149 151
150 scoped_refptr<TrackedCallback> enumerate_devices_callback_; 152 scoped_refptr<TrackedCallback> enumerate_devices_callback_;
151 scoped_refptr<TrackedCallback> open_callback_; 153 scoped_refptr<TrackedCallback> open_callback_;
152 154
153 // Owning reference to the current config object. This isn't actually used, 155 // Owning reference to the current config object. This isn't actually used,
154 // we just dish it out as requested by the plugin. 156 // we just dish it out as requested by the plugin.
155 ScopedPPResource config_; 157 ScopedPPResource config_;
156 158
157 // Output parameter of EnumerateDevices(). It should not be accessed after 159 // Output parameter of EnumerateDevices(). It should not be accessed after
158 // |enumerate_devices_callback_| is run. 160 // StopEnumerateDevices is called.
159 PP_Resource* devices_; 161 PP_Resource* devices_;
162 int enumeration_request_id_;
160 163
161 ResourceObjectType resource_object_type_; 164 ResourceObjectType resource_object_type_;
162 165
163 DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Shared); 166 DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Shared);
164 }; 167 };
165 168
166 } // namespace ppapi 169 } // namespace ppapi
167 170
168 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_ 171 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_INPUT_SHARED_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698