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

Side by Side Diff: content/renderer/media/image_capture_frame_grabber.h

Issue 2418923003: ImageCapture: avoid several grabFrame()s in flight, beef up content_browsertests (Closed)
Patch Set: xianglu@ comments Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_MEDIA_IMAGE_CAPTURE_FRAME_GRABBER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_IMAGE_CAPTURE_FRAME_GRABBER_H_
6 #define CONTENT_RENDERER_MEDIA_IMAGE_CAPTURE_FRAME_GRABBER_H_ 6 #define CONTENT_RENDERER_MEDIA_IMAGE_CAPTURE_FRAME_GRABBER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 28 matching lines...) Expand all
39 blink::WebImageCaptureGrabFrameCallbacks* callbacks) override; 39 blink::WebImageCaptureGrabFrameCallbacks* callbacks) override;
40 40
41 private: 41 private:
42 // Internal class to receive, convert and forward one frame. 42 // Internal class to receive, convert and forward one frame.
43 class SingleShotFrameHandler; 43 class SingleShotFrameHandler;
44 44
45 void OnSkImage( 45 void OnSkImage(
46 ScopedWebCallbacks<blink::WebImageCaptureGrabFrameCallbacks> callbacks, 46 ScopedWebCallbacks<blink::WebImageCaptureGrabFrameCallbacks> callbacks,
47 sk_sp<SkImage> image); 47 sk_sp<SkImage> image);
48 48
49 // Flag to indicate that there is a frame grabbing in progress.
50 bool frame_grab_in_progress_;
51
49 base::ThreadChecker thread_checker_; 52 base::ThreadChecker thread_checker_;
50 base::WeakPtrFactory<ImageCaptureFrameGrabber> weak_factory_; 53 base::WeakPtrFactory<ImageCaptureFrameGrabber> weak_factory_;
51 54
52 DISALLOW_COPY_AND_ASSIGN(ImageCaptureFrameGrabber); 55 DISALLOW_COPY_AND_ASSIGN(ImageCaptureFrameGrabber);
53 }; 56 };
54 57
55 } // namespace content 58 } // namespace content
56 59
57 #endif // CONTENT_RENDERER_MEDIA_IMAGE_CAPTURE_FRAME_GRABBER_H_ 60 #endif // CONTENT_RENDERER_MEDIA_IMAGE_CAPTURE_FRAME_GRABBER_H_
OLDNEW
« no previous file with comments | « content/browser/webrtc/webrtc_image_capture_browsertest.cc ('k') | content/renderer/media/image_capture_frame_grabber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698