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_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 static media::VideoCaptureDevice* Create(const std::string& device_id); | 40 static media::VideoCaptureDevice* Create(const std::string& device_id); |
41 | 41 |
42 virtual ~WebContentsVideoCaptureDevice(); | 42 virtual ~WebContentsVideoCaptureDevice(); |
43 | 43 |
44 // VideoCaptureDevice implementation. | 44 // VideoCaptureDevice implementation. |
45 virtual void Allocate(const media::VideoCaptureCapability& capture_format, | 45 virtual void Allocate(const media::VideoCaptureCapability& capture_format, |
46 VideoCaptureDevice::EventHandler* observer) OVERRIDE; | 46 VideoCaptureDevice::EventHandler* observer) OVERRIDE; |
47 virtual void Start() OVERRIDE; | 47 virtual void Start() OVERRIDE; |
48 virtual void Stop() OVERRIDE; | 48 virtual void Stop() OVERRIDE; |
49 virtual void DeAllocate() OVERRIDE; | 49 virtual void DeAllocate() OVERRIDE; |
| 50 virtual void GetDeviceSupportedFormats( |
| 51 const std::string& device_name, |
| 52 media::VideoCaptureFormats* capture_formats) OVERRIDE; |
50 | 53 |
51 // Note: The following is just a pass-through of the device_id provided to the | 54 // Note: The following is just a pass-through of the device_id provided to the |
52 // constructor. It does not change when the content of the page changes | 55 // constructor. It does not change when the content of the page changes |
53 // (e.g., due to navigation), or when the underlying RenderView is | 56 // (e.g., due to navigation), or when the underlying RenderView is |
54 // swapped-out. | 57 // swapped-out. |
55 virtual const Name& device_name() OVERRIDE; | 58 virtual const Name& device_name() OVERRIDE; |
56 | 59 |
57 private: | 60 private: |
58 class Impl; | 61 class Impl; |
59 | 62 |
60 WebContentsVideoCaptureDevice(const Name& name, | 63 WebContentsVideoCaptureDevice(const Name& name, |
61 int render_process_id, | 64 int render_process_id, |
62 int render_view_id); | 65 int render_view_id); |
63 | 66 |
64 Name device_name_; | 67 Name device_name_; |
65 const scoped_ptr<Impl> impl_; | 68 const scoped_ptr<Impl> impl_; |
66 | 69 |
67 DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice); | 70 DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice); |
68 }; | 71 }; |
69 | 72 |
70 | 73 |
71 } // namespace content | 74 } // namespace content |
72 | 75 |
73 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE
_H_ | 76 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE
_H_ |
OLD | NEW |