OLD | NEW |
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_MEDIA_DEVICE_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_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" |
(...skipping 11 matching lines...) Expand all Loading... |
22 public RenderViewObserver, | 22 public RenderViewObserver, |
23 public RenderViewObserverTracker<PepperMediaDeviceManager>, | 23 public RenderViewObserverTracker<PepperMediaDeviceManager>, |
24 public base::SupportsWeakPtr<PepperMediaDeviceManager> { | 24 public base::SupportsWeakPtr<PepperMediaDeviceManager> { |
25 public: | 25 public: |
26 static PepperMediaDeviceManager* GetForRenderView(RenderView* render_view); | 26 static PepperMediaDeviceManager* GetForRenderView(RenderView* render_view); |
27 virtual ~PepperMediaDeviceManager(); | 27 virtual ~PepperMediaDeviceManager(); |
28 | 28 |
29 // PepperDeviceEnumerationHostHelper::Delegate implementation: | 29 // PepperDeviceEnumerationHostHelper::Delegate implementation: |
30 virtual int EnumerateDevices( | 30 virtual int EnumerateDevices( |
31 PP_DeviceType_Dev type, | 31 PP_DeviceType_Dev type, |
| 32 const GURL& document_url, |
32 const EnumerateDevicesCallback& callback) OVERRIDE; | 33 const EnumerateDevicesCallback& callback) OVERRIDE; |
33 virtual void StopEnumerateDevices(int request_id) OVERRIDE; | 34 virtual void StopEnumerateDevices(int request_id) OVERRIDE; |
34 | 35 |
35 typedef base::Callback<void (int /* request_id */, | 36 typedef base::Callback<void (int /* request_id */, |
36 bool /* succeeded */, | 37 bool /* succeeded */, |
37 const std::string& /* label */)> | 38 const std::string& /* label */)> |
38 OpenDeviceCallback; | 39 OpenDeviceCallback; |
39 | 40 |
40 // Opens the specified device. The request ID passed into the callback will be | 41 // Opens the specified device. The request ID passed into the callback will be |
41 // the same as the return value. If successful, the label passed into the | 42 // the same as the return value. If successful, the label passed into the |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 97 |
97 typedef std::map<int, OpenDeviceCallback> OpenCallbackMap; | 98 typedef std::map<int, OpenDeviceCallback> OpenCallbackMap; |
98 OpenCallbackMap open_callbacks_; | 99 OpenCallbackMap open_callbacks_; |
99 | 100 |
100 DISALLOW_COPY_AND_ASSIGN(PepperMediaDeviceManager); | 101 DISALLOW_COPY_AND_ASSIGN(PepperMediaDeviceManager); |
101 }; | 102 }; |
102 | 103 |
103 } // namespace content | 104 } // namespace content |
104 | 105 |
105 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ | 106 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ |
OLD | NEW |