| 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_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> |
| 11 #include <string> | 12 #include <string> |
| 12 #include <vector> | 13 #include <vector> |
| 13 | 14 |
| 14 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
| 15 #include "base/memory/scoped_ptr.h" | |
| 16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 17 #include "media/audio/audio_parameters.h" | 17 #include "media/audio/audio_parameters.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
| 19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 23 // Types of media streams. | 23 // Types of media streams. |
| 24 enum MediaStreamType { | 24 enum MediaStreamType { |
| 25 MEDIA_NO_SERVICE = 0, | 25 MEDIA_NO_SERVICE = 0, |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 public: | 257 public: |
| 258 virtual ~MediaStreamUI() {} | 258 virtual ~MediaStreamUI() {} |
| 259 | 259 |
| 260 // Called when MediaStream capturing is started. Chrome layer can call |stop| | 260 // Called when MediaStream capturing is started. Chrome layer can call |stop| |
| 261 // to stop the stream. Returns the platform-dependent window ID for the UI, or | 261 // to stop the stream. Returns the platform-dependent window ID for the UI, or |
| 262 // 0 if not applicable. | 262 // 0 if not applicable. |
| 263 virtual gfx::NativeViewId OnStarted(const base::Closure& stop) = 0; | 263 virtual gfx::NativeViewId OnStarted(const base::Closure& stop) = 0; |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 // Callback used return results of media access requests. | 266 // Callback used return results of media access requests. |
| 267 typedef base::Callback<void( | 267 typedef base::Callback<void(const MediaStreamDevices& devices, |
| 268 const MediaStreamDevices& devices, | 268 content::MediaStreamRequestResult result, |
| 269 content::MediaStreamRequestResult result, | 269 std::unique_ptr<MediaStreamUI> ui)> |
| 270 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; | 270 MediaResponseCallback; |
| 271 | 271 |
| 272 } // namespace content | 272 } // namespace content |
| 273 | 273 |
| 274 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 274 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| OLD | NEW |