| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 int request_id, | 65 int request_id, |
| 66 content::MediaStreamRequestResult result) override; | 66 content::MediaStreamRequestResult result) override; |
| 67 void OnDeviceStopped(const std::string& label, | 67 void OnDeviceStopped(const std::string& label, |
| 68 const StreamDeviceInfo& device_info) override; | 68 const StreamDeviceInfo& device_info) override; |
| 69 void OnDevicesEnumerated(int request_id, | 69 void OnDevicesEnumerated(int request_id, |
| 70 const StreamDeviceInfoArray& device_array) override; | 70 const StreamDeviceInfoArray& device_array) override; |
| 71 void OnDeviceOpened(int request_id, | 71 void OnDeviceOpened(int request_id, |
| 72 const std::string& label, | 72 const std::string& label, |
| 73 const StreamDeviceInfo& device_info) override; | 73 const StreamDeviceInfo& device_info) override; |
| 74 void OnDeviceOpenFailed(int request_id) override; | 74 void OnDeviceOpenFailed(int request_id) override; |
| 75 void OnDevicesChanged() override; |
| 75 | 76 |
| 76 // Stream type conversion. | 77 // Stream type conversion. |
| 77 static MediaStreamType FromPepperDeviceType(PP_DeviceType_Dev type); | 78 static MediaStreamType FromPepperDeviceType(PP_DeviceType_Dev type); |
| 78 static PP_DeviceType_Dev FromMediaStreamType(MediaStreamType type); | 79 static PP_DeviceType_Dev FromMediaStreamType(MediaStreamType type); |
| 79 | 80 |
| 80 private: | 81 private: |
| 81 explicit PepperMediaDeviceManager(RenderFrame* render_frame); | 82 explicit PepperMediaDeviceManager(RenderFrame* render_frame); |
| 82 | 83 |
| 83 // Called by StopEnumerateDevices() after returing to the event loop, to avoid | 84 // Called by StopEnumerateDevices() after returing to the event loop, to avoid |
| 84 // a reentrancy problem. | 85 // a reentrancy problem. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 98 | 99 |
| 99 typedef std::map<int, OpenDeviceCallback> OpenCallbackMap; | 100 typedef std::map<int, OpenDeviceCallback> OpenCallbackMap; |
| 100 OpenCallbackMap open_callbacks_; | 101 OpenCallbackMap open_callbacks_; |
| 101 | 102 |
| 102 DISALLOW_COPY_AND_ASSIGN(PepperMediaDeviceManager); | 103 DISALLOW_COPY_AND_ASSIGN(PepperMediaDeviceManager); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace content | 106 } // namespace content |
| 106 | 107 |
| 107 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ | 108 #endif // CONTENT_RENDERER_PEPPER_PEPPER_MEDIA_DEVICE_MANAGER_H_ |
| OLD | NEW |