Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1007)

Unified Diff: content/renderer/pepper/pepper_platform_image_capture.h

Issue 848863002: PPAPI: implement GetSupportedPreviewSizes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo: int32->int32_t Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..b65acee1647334c0c69f1f5c77eb748b16b569cd 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 2015 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);
+ ~PepperPlatformImageCapture();
// 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
« no previous file with comments | « content/renderer/pepper/pepper_image_capture_host.cc ('k') | content/renderer/pepper/pepper_platform_image_capture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698