Chromium Code Reviews| Index: content/renderer/pepper/pepper_platform_image_capture.h |
| diff --git a/content/renderer/pepper/pepper_platform_video_capture.h b/content/renderer/pepper/pepper_platform_image_capture.h |
| similarity index 66% |
| copy from content/renderer/pepper/pepper_platform_video_capture.h |
| copy to content/renderer/pepper/pepper_platform_image_capture.h |
| index 2412f492bd6290815f51426a7cc8c568502e548a..d9ac7bee74e4f30cc445c318c03e679f65ab4a80 100644 |
| --- a/content/renderer/pepper/pepper_platform_video_capture.h |
| +++ b/content/renderer/pepper/pepper_platform_image_capture.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -13,7 +13,6 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/threading/thread_checker.h" |
| -#include "base/time/time.h" |
| #include "content/common/media/video_capture.h" |
| #include "media/video/capture/video_capture_types.h" |
| @@ -21,29 +20,28 @@ class GURL; |
| namespace content { |
| class PepperMediaDeviceManager; |
| -class PepperVideoCaptureHost; |
| +class PepperImageCaptureHost; |
| // This object must only be used on the thread it's constructed on. |
| -class PepperPlatformVideoCapture { |
| +class PepperPlatformImageCapture { |
| public: |
| - PepperPlatformVideoCapture(int render_frame_id, |
| + PepperPlatformImageCapture(int render_frame_id, |
| const std::string& device_id, |
| const GURL& document_url, |
| - PepperVideoCaptureHost* handler); |
| - virtual ~PepperPlatformVideoCapture(); |
| + PepperImageCaptureHost* handler); |
| + virtual ~PepperPlatformImageCapture(); |
|
dmichael (off chromium)
2015/02/09 22:26:59
nit: Doesn't seem like this needs to be virtual
Justin Chuang
2015/02/10 16:01:02
Done. Thanks
|
| // Detaches the event handler and stops sending notifications to it. |
| void DetachEventHandler(); |
| - void StartCapture(const media::VideoCaptureParams& params); |
| - void StopCapture(); |
| + void GetPreviewSizes(); |
| private: |
| void OnDeviceOpened(int request_id, bool succeeded, const std::string& label); |
| - void OnStateUpdate(VideoCaptureState state); |
| - void OnFrameReady(const scoped_refptr<media::VideoFrame>& frame, |
| - const media::VideoCaptureFormat& format, |
| - const base::TimeTicks& estimated_capture_time); |
| + |
| + // Called by VideoCaptureImplManager. |
| + void OnDeviceSupportedFormatsEnumerated( |
| + const media::VideoCaptureFormats& formats); |
| // Can return NULL if the RenderFrame referenced by |render_frame_id_| has |
| // gone away. |
| @@ -55,9 +53,8 @@ class PepperPlatformVideoCapture { |
| std::string label_; |
| int session_id_; |
| base::Closure release_device_cb_; |
| - base::Closure stop_capture_cb_; |
| - PepperVideoCaptureHost* handler_; |
| + PepperImageCaptureHost* handler_; |
| // Whether we have a pending request to open a device. We have to make sure |
| // there isn't any pending request before this object goes away. |
| @@ -66,9 +63,9 @@ class PepperPlatformVideoCapture { |
| base::ThreadChecker thread_checker_; |
| - base::WeakPtrFactory<PepperPlatformVideoCapture> weak_factory_; |
| + base::WeakPtrFactory<PepperPlatformImageCapture> weak_factory_; |
| - DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture); |
| + DISALLOW_COPY_AND_ASSIGN(PepperPlatformImageCapture); |
| }; |
| } // namespace content |