OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_VIDEO_SOURCE_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 private: | 36 private: |
37 // This helper object receives frames on a video worker thread and passes | 37 // This helper object receives frames on a video worker thread and passes |
38 // them on to us. | 38 // them on to us. |
39 class FrameReceiver : public FrameReaderInterface, | 39 class FrameReceiver : public FrameReaderInterface, |
40 public base::RefCountedThreadSafe<FrameReceiver> { | 40 public base::RefCountedThreadSafe<FrameReceiver> { |
41 public: | 41 public: |
42 explicit FrameReceiver(const base::WeakPtr<PepperVideoSourceHost>& host); | 42 explicit FrameReceiver(const base::WeakPtr<PepperVideoSourceHost>& host); |
43 | 43 |
44 // FrameReaderInterface implementation. | 44 // FrameReaderInterface implementation. |
45 virtual bool GotFrame( | 45 virtual bool GotFrame(const scoped_refptr<media::VideoFrame>& frame) |
46 const scoped_refptr<media::VideoFrame>& frame) OVERRIDE; | 46 OVERRIDE; |
47 | 47 |
48 void OnGotFrame(const scoped_refptr<media::VideoFrame>& frame); | 48 void OnGotFrame(const scoped_refptr<media::VideoFrame>& frame); |
49 | 49 |
50 private: | 50 private: |
51 friend class base::RefCountedThreadSafe<FrameReceiver>; | 51 friend class base::RefCountedThreadSafe<FrameReceiver>; |
52 virtual ~FrameReceiver(); | 52 virtual ~FrameReceiver(); |
53 | 53 |
54 base::WeakPtr<PepperVideoSourceHost> host_; | 54 base::WeakPtr<PepperVideoSourceHost> host_; |
55 scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_; | 55 scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_; |
56 }; | 56 }; |
(...skipping 24 matching lines...) Expand all Loading... |
81 bool get_frame_pending_; | 81 bool get_frame_pending_; |
82 | 82 |
83 base::WeakPtrFactory<PepperVideoSourceHost> weak_factory_; | 83 base::WeakPtrFactory<PepperVideoSourceHost> weak_factory_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(PepperVideoSourceHost); | 85 DISALLOW_COPY_AND_ASSIGN(PepperVideoSourceHost); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace content | 88 } // namespace content |
89 | 89 |
90 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ | 90 #endif // CONTENT_RENDERER_PEPPER_PEPPER_VIDEO_SOURCE_HOST_H_ |
OLD | NEW |