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 #include "content/renderer/pepper/pepper_video_source_host.h" | 5 #include "content/renderer/pepper/pepper_video_source_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/safe_numerics.h" | 8 #include "base/safe_numerics.h" |
9 #include "content/public/renderer/renderer_ppapi_host.h" | 9 #include "content/public/renderer/renderer_ppapi_host.h" |
| 10 #include "content/renderer/pepper/ppb_image_data_impl.h" |
10 #include "content/renderer/render_thread_impl.h" | 11 #include "content/renderer/render_thread_impl.h" |
11 #include "ppapi/c/pp_errors.h" | 12 #include "ppapi/c/pp_errors.h" |
12 #include "ppapi/host/dispatch_host_message.h" | 13 #include "ppapi/host/dispatch_host_message.h" |
13 #include "ppapi/host/ppapi_host.h" | 14 #include "ppapi/host/ppapi_host.h" |
14 #include "ppapi/proxy/ppapi_messages.h" | 15 #include "ppapi/proxy/ppapi_messages.h" |
15 #include "ppapi/proxy/ppb_image_data_proxy.h" | 16 #include "ppapi/proxy/ppb_image_data_proxy.h" |
16 #include "ppapi/shared_impl/scoped_pp_resource.h" | 17 #include "ppapi/shared_impl/scoped_pp_resource.h" |
17 #include "ppapi/thunk/enter.h" | 18 #include "ppapi/thunk/enter.h" |
18 #include "ppapi/thunk/ppb_image_data_api.h" | 19 #include "ppapi/thunk/ppb_image_data_api.h" |
19 #include "third_party/libjingle/source/talk/media/base/videocommon.h" | 20 #include "third_party/libjingle/source/talk/media/base/videocommon.h" |
20 #include "third_party/libjingle/source/talk/media/base/videoframe.h" | 21 #include "third_party/libjingle/source/talk/media/base/videoframe.h" |
21 #include "third_party/skia/include/core/SkBitmap.h" | 22 #include "third_party/skia/include/core/SkBitmap.h" |
22 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" | |
23 | 23 |
24 using ppapi::host::HostMessageContext; | 24 using ppapi::host::HostMessageContext; |
25 using ppapi::host::ReplyMessageContext; | 25 using ppapi::host::ReplyMessageContext; |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 PepperVideoSourceHost::FrameReceiver::FrameReceiver( | 29 PepperVideoSourceHost::FrameReceiver::FrameReceiver( |
30 const base::WeakPtr<PepperVideoSourceHost>& host) | 30 const base::WeakPtr<PepperVideoSourceHost>& host) |
31 : host_(host), | 31 : host_(host), |
32 main_message_loop_proxy_(base::MessageLoopProxy::current()) { | 32 main_message_loop_proxy_(base::MessageLoopProxy::current()) { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 void PepperVideoSourceHost::Close() { | 223 void PepperVideoSourceHost::Close() { |
224 if (source_handler_.get() && !stream_url_.empty()) | 224 if (source_handler_.get() && !stream_url_.empty()) |
225 source_handler_->Close(stream_url_, frame_receiver_.get()); | 225 source_handler_->Close(stream_url_, frame_receiver_.get()); |
226 | 226 |
227 source_handler_.reset(NULL); | 227 source_handler_.reset(NULL); |
228 stream_url_.clear(); | 228 stream_url_.clear(); |
229 } | 229 } |
230 | 230 |
231 } // namespace content | 231 } // namespace content |
OLD | NEW |