| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PLATFORM_CAMERA_DEVICE_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CAMERA_DEVICE_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CAMERA_DEVICE_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CAMERA_DEVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
| 16 #include "content/common/media/video_capture.h" | 16 #include "content/common/media/video_capture.h" |
| 17 #include "media/capture/video_capture_types.h" | 17 #include "media/capture/video_capture_types.h" |
| 18 | 18 |
| 19 class GURL; | |
| 20 | |
| 21 namespace content { | 19 namespace content { |
| 22 class PepperMediaDeviceManager; | 20 class PepperMediaDeviceManager; |
| 23 class PepperCameraDeviceHost; | 21 class PepperCameraDeviceHost; |
| 24 | 22 |
| 25 // This object must only be used on the thread it's constructed on. | 23 // This object must only be used on the thread it's constructed on. |
| 26 class PepperPlatformCameraDevice { | 24 class PepperPlatformCameraDevice { |
| 27 public: | 25 public: |
| 28 PepperPlatformCameraDevice(int render_frame_id, | 26 PepperPlatformCameraDevice(int render_frame_id, |
| 29 const std::string& device_id, | 27 const std::string& device_id, |
| 30 const GURL& document_url, | |
| 31 PepperCameraDeviceHost* handler); | 28 PepperCameraDeviceHost* handler); |
| 32 ~PepperPlatformCameraDevice(); | 29 ~PepperPlatformCameraDevice(); |
| 33 | 30 |
| 34 // Detaches the event handler and stops sending notifications to it. | 31 // Detaches the event handler and stops sending notifications to it. |
| 35 void DetachEventHandler(); | 32 void DetachEventHandler(); |
| 36 | 33 |
| 37 void GetSupportedVideoCaptureFormats(); | 34 void GetSupportedVideoCaptureFormats(); |
| 38 | 35 |
| 39 private: | 36 private: |
| 40 void OnDeviceOpened(int request_id, bool succeeded, const std::string& label); | 37 void OnDeviceOpened(int request_id, bool succeeded, const std::string& label); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 64 base::ThreadChecker thread_checker_; | 61 base::ThreadChecker thread_checker_; |
| 65 | 62 |
| 66 base::WeakPtrFactory<PepperPlatformCameraDevice> weak_factory_; | 63 base::WeakPtrFactory<PepperPlatformCameraDevice> weak_factory_; |
| 67 | 64 |
| 68 DISALLOW_COPY_AND_ASSIGN(PepperPlatformCameraDevice); | 65 DISALLOW_COPY_AND_ASSIGN(PepperPlatformCameraDevice); |
| 69 }; | 66 }; |
| 70 | 67 |
| 71 } // namespace content | 68 } // namespace content |
| 72 | 69 |
| 73 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CAMERA_DEVICE_H_ | 70 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CAMERA_DEVICE_H_ |
| OLD | NEW |