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

Side by Side Diff: content/renderer/pepper/pepper_platform_video_capture.h

Issue 2882133002: Block insecure pepper media requests in the renderer (Closed)
Patch Set: Block insecure pepper media requests Created 3 years, 7 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 (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_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_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 "base/time/time.h" 16 #include "base/time/time.h"
17 #include "content/common/media/video_capture.h" 17 #include "content/common/media/video_capture.h"
18 #include "media/capture/video_capture_types.h" 18 #include "media/capture/video_capture_types.h"
19 19
20 class GURL;
21
22 namespace media { 20 namespace media {
23 class VideoFrame; 21 class VideoFrame;
24 } // namespace media 22 } // namespace media
25 23
26 namespace content { 24 namespace content {
27 class PepperMediaDeviceManager; 25 class PepperMediaDeviceManager;
28 class PepperVideoCaptureHost; 26 class PepperVideoCaptureHost;
29 27
30 // This object must only be used on the thread it's constructed on. 28 // This object must only be used on the thread it's constructed on.
31 class PepperPlatformVideoCapture { 29 class PepperPlatformVideoCapture {
32 public: 30 public:
33 PepperPlatformVideoCapture(int render_frame_id, 31 PepperPlatformVideoCapture(int render_frame_id,
34 const std::string& device_id, 32 const std::string& device_id,
35 const GURL& document_url,
36 PepperVideoCaptureHost* handler); 33 PepperVideoCaptureHost* handler);
37 virtual ~PepperPlatformVideoCapture(); 34 virtual ~PepperPlatformVideoCapture();
38 35
39 // Detaches the event handler and stops sending notifications to it. 36 // Detaches the event handler and stops sending notifications to it.
40 void DetachEventHandler(); 37 void DetachEventHandler();
41 38
42 void StartCapture(const media::VideoCaptureParams& params); 39 void StartCapture(const media::VideoCaptureParams& params);
43 void StopCapture(); 40 void StopCapture();
44 41
45 private: 42 private:
(...skipping 24 matching lines...) Expand all
70 base::ThreadChecker thread_checker_; 67 base::ThreadChecker thread_checker_;
71 68
72 base::WeakPtrFactory<PepperPlatformVideoCapture> weak_factory_; 69 base::WeakPtrFactory<PepperPlatformVideoCapture> weak_factory_;
73 70
74 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture); 71 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVideoCapture);
75 }; 72 };
76 73
77 } // namespace content 74 } // namespace content
78 75
79 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_ 76 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_VIDEO_CAPTURE_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_platform_camera_device.cc ('k') | content/renderer/pepper/pepper_platform_video_capture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698