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

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

Issue 11411047: Introduce PPB_AudioInput_Dev v0.3 and refactor the device enumeration code: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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 CONTENT_RENDERER_PEPPER_PEPPER_DEVICE_ENUMERATION_EVENT_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_DEVICE_ENUMERATION_EVENT_HANDLER_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_DEVICE_ENUMERATION_EVENT_HANDLER_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_DEVICE_ENUMERATION_EVENT_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" 11 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h"
12 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" 12 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
13 #include "webkit/plugins/ppapi/plugin_delegate.h" 13 #include "webkit/plugins/ppapi/plugin_delegate.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class PepperDeviceEnumerationEventHandler 17 class PepperDeviceEnumerationEventHandler
18 : public MediaStreamDispatcherEventHandler, 18 : public MediaStreamDispatcherEventHandler,
19 public base::SupportsWeakPtr<PepperDeviceEnumerationEventHandler> { 19 public base::SupportsWeakPtr<PepperDeviceEnumerationEventHandler> {
20 public: 20 public:
21 PepperDeviceEnumerationEventHandler(); 21 PepperDeviceEnumerationEventHandler();
22 virtual ~PepperDeviceEnumerationEventHandler(); 22 virtual ~PepperDeviceEnumerationEventHandler();
23 23
24 int RegisterEnumerateDevicesCallback( 24 int RegisterEnumerateDevicesCallback(
25 const webkit::ppapi::PluginDelegate::EnumerateDevicesCallback& callback); 25 const webkit::ppapi::PluginDelegate::EnumerateDevicesCallback& callback);
26 void UnregisterEnumerateDevicesCallback(int request_id);
26 27
27 int RegisterOpenDeviceCallback( 28 int RegisterOpenDeviceCallback(
28 const PepperPluginDelegateImpl::OpenDeviceCallback& callback); 29 const PepperPluginDelegateImpl::OpenDeviceCallback& callback);
29 30
30 // MediaStreamDispatcherEventHandler implementation. 31 // MediaStreamDispatcherEventHandler implementation.
31 virtual void OnStreamGenerated( 32 virtual void OnStreamGenerated(
32 int request_id, 33 int request_id,
33 const std::string& label, 34 const std::string& label,
34 const StreamDeviceInfoArray& audio_device_array, 35 const StreamDeviceInfoArray& audio_device_array,
35 const StreamDeviceInfoArray& video_device_array) OVERRIDE; 36 const StreamDeviceInfoArray& video_device_array) OVERRIDE;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 typedef std::map<int, PepperPluginDelegateImpl::OpenDeviceCallback> 69 typedef std::map<int, PepperPluginDelegateImpl::OpenDeviceCallback>
69 OpenCallbackMap; 70 OpenCallbackMap;
70 OpenCallbackMap open_callbacks_; 71 OpenCallbackMap open_callbacks_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(PepperDeviceEnumerationEventHandler); 73 DISALLOW_COPY_AND_ASSIGN(PepperDeviceEnumerationEventHandler);
73 }; 74 };
74 75
75 } // namespace content 76 } // namespace content
76 77
77 #endif // CONTENT_RENDERER_PEPPER_PEPPER_DEVICE_ENUMERATION_EVENT_HANDLER_H_ 78 #endif // CONTENT_RENDERER_PEPPER_PEPPER_DEVICE_ENUMERATION_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_audio_input_host.cc ('k') | content/renderer/pepper/pepper_device_enumeration_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698