 Chromium Code Reviews
 Chromium Code Reviews Issue 10542092:
  Refactor the content interface for RequestMediaAccessPermission.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 10542092:
  Refactor the content interface for RequestMediaAccessPermission.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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 <map> | 8 #include <map> | 
| 9 #include <string> | 9 #include <string> | 
| 10 #include <vector> | 10 #include <vector> | 
| 11 | 11 | 
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" | 
| 13 #include "base/callback.h" | |
| 13 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" | 
| 14 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" | 
| 15 | 16 | 
| 16 namespace content { | 17 namespace content { | 
| 17 | 18 | 
| 18 // Types of media streams. | 19 // Types of media streams. | 
| 19 enum MediaStreamDeviceType { | 20 enum MediaStreamDeviceType { | 
| 20 MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE = 0, | 21 MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE = 0, | 
| 21 MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE, | 22 MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE, | 
| 22 MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, | 23 MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, | 
| (...skipping 15 matching lines...) Expand all Loading... | |
| 38 | 39 | 
| 39 // The device's "friendly" name. Not guaranteed to be unique. | 40 // The device's "friendly" name. Not guaranteed to be unique. | 
| 40 std::string name; | 41 std::string name; | 
| 41 }; | 42 }; | 
| 42 | 43 | 
| 43 typedef std::vector<MediaStreamDevice> MediaStreamDevices; | 44 typedef std::vector<MediaStreamDevice> MediaStreamDevices; | 
| 44 | 45 | 
| 45 typedef std::map<MediaStreamDeviceType, MediaStreamDevices> | 46 typedef std::map<MediaStreamDeviceType, MediaStreamDevices> | 
| 46 MediaStreamDeviceMap; | 47 MediaStreamDeviceMap; | 
| 47 | 48 | 
| 49 typedef base::Callback< void(const MediaStreamDevices&) > MediaResponseCallback; | |
| 
jam
2012/06/11 05:31:57
nit: I realize you put this here because it's used
 
Evan Stade
2012/06/12 00:00:46
done, although it leads to the somewhat funky incl
 | |
| 50 | |
| 48 // Represents a request for media streams (audio/video). | 51 // Represents a request for media streams (audio/video). | 
| 49 struct CONTENT_EXPORT MediaStreamRequest { | 52 struct CONTENT_EXPORT MediaStreamRequest { | 
| 50 MediaStreamRequest( | 53 MediaStreamRequest( | 
| 51 int render_process_id, | 54 int render_process_id, | 
| 52 int render_view_id, | 55 int render_view_id, | 
| 53 const GURL& security_origin); | 56 const GURL& security_origin); | 
| 54 | 57 | 
| 55 ~MediaStreamRequest(); | 58 ~MediaStreamRequest(); | 
| 56 | 59 | 
| 57 // The render process id generating this request. | 60 // The render process id generating this request. | 
| 58 int render_process_id; | 61 int render_process_id; | 
| 59 | 62 | 
| 60 // The render view id generating this request. | 63 // The render view id generating this request. | 
| 61 int render_view_id; | 64 int render_view_id; | 
| 62 | 65 | 
| 63 // The WebKit security origin for the current request (e.g. "html5rocks.com"). | 66 // The WebKit security origin for the current request (e.g. "html5rocks.com"). | 
| 64 GURL security_origin; | 67 GURL security_origin; | 
| 65 | 68 | 
| 66 // A list of devices present on the user's computer, for each device type | 69 // A list of devices present on the user's computer, for each device type | 
| 67 // requested. | 70 // requested. | 
| 68 MediaStreamDeviceMap devices; | 71 MediaStreamDeviceMap devices; | 
| 69 }; | 72 }; | 
| 70 | 73 | 
| 71 } // namespace content | 74 } // namespace content | 
| 72 | 75 | 
| 73 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 76 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 
| OLD | NEW |