| 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 24 matching lines...) Expand all Loading... |
| 35 // |destroy_cb| is invoked on an outside thread once all outstanding objects | 35 // |destroy_cb| is invoked on an outside thread once all outstanding objects |
| 36 // are completely destroyed -- this will be some time after the | 36 // are completely destroyed -- this will be some time after the |
| 37 // WebContentsVideoCaptureDevice is itself deleted. | 37 // WebContentsVideoCaptureDevice is itself deleted. |
| 38 // TODO(miu): Passing a destroy callback suggests needing to revisit the | 38 // TODO(miu): Passing a destroy callback suggests needing to revisit the |
| 39 // design philosophy of an asynchronous DeAllocate(). http://crbug.com/158641 | 39 // design philosophy of an asynchronous DeAllocate(). http://crbug.com/158641 |
| 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 AllocateAndStart( | 45 virtual void AllocateAndStart(const media::VideoCaptureParams& params, |
| 46 const media::VideoCaptureCapability& capture_format, | 46 scoped_ptr<Client> client) OVERRIDE; |
| 47 scoped_ptr<Client> client) OVERRIDE; | |
| 48 virtual void StopAndDeAllocate() OVERRIDE; | 47 virtual void StopAndDeAllocate() OVERRIDE; |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 class Impl; | 50 class Impl; |
| 52 | 51 |
| 53 WebContentsVideoCaptureDevice(int render_process_id, int render_view_id); | 52 WebContentsVideoCaptureDevice(int render_process_id, int render_view_id); |
| 54 | 53 |
| 55 const scoped_ptr<Impl> impl_; | 54 const scoped_ptr<Impl> impl_; |
| 56 | 55 |
| 57 DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice); | 56 DISALLOW_COPY_AND_ASSIGN(WebContentsVideoCaptureDevice); |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 | 59 |
| 61 } // namespace content | 60 } // namespace content |
| 62 | 61 |
| 63 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE
_H_ | 62 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEB_CONTENTS_VIDEO_CAPTURE_DEVICE
_H_ |
| OLD | NEW |