| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/media_capture_from_element/canvas_capture_handler.h" | 5 #include "content/renderer/media_capture_from_element/canvas_capture_handler.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/base64.h" | 9 #include "base/base64.h" | 
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" | 
| 11 #include "base/macros.h" | 11 #include "base/macros.h" | 
| 12 #include "base/rand_util.h" | 12 #include "base/rand_util.h" | 
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" | 
| 14 #include "content/public/renderer/render_thread.h" | 14 #include "content/public/renderer/render_thread.h" | 
| 15 #include "content/renderer/media/media_stream_video_capturer_source.h" | 15 #include "content/renderer/media/media_stream_video_capturer_source.h" | 
| 16 #include "content/renderer/media/media_stream_video_source.h" | 16 #include "content/renderer/media/media_stream_video_source.h" | 
| 17 #include "content/renderer/media/media_stream_video_track.h" | 17 #include "content/renderer/media/media_stream_video_track.h" | 
| 18 #include "content/renderer/media/webrtc_uma_histograms.h" | 18 #include "content/renderer/media/webrtc_uma_histograms.h" | 
| 19 #include "content/renderer/render_thread_impl.h" | 19 #include "content/renderer/render_thread_impl.h" | 
| 20 #include "media/base/limits.h" | 20 #include "media/base/limits.h" | 
| 21 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 21 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 
| 22 #include "third_party/WebKit/public/platform/WebString.h" | 22 #include "third_party/WebKit/public/platform/WebString.h" | 
|  | 23 #undef FOURCC // Leaky macro from both libyuv and webrtc | 
| 23 #include "third_party/libyuv/include/libyuv.h" | 24 #include "third_party/libyuv/include/libyuv.h" | 
|  | 25 #undef FOURCC // Leaky macro from both libyuv and webrtc | 
| 24 #include "third_party/skia/include/core/SkImage.h" | 26 #include "third_party/skia/include/core/SkImage.h" | 
| 25 | 27 | 
| 26 namespace { | 28 namespace { | 
| 27 | 29 | 
| 28 using media::VideoFrame; | 30 using media::VideoFrame; | 
| 29 | 31 | 
| 30 const size_t kArgbBytesPerPixel = 4; | 32 const size_t kArgbBytesPerPixel = 4; | 
| 31 | 33 | 
| 32 }  // namespace | 34 }  // namespace | 
| 33 | 35 | 
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 266                            track_id, false); | 268                            track_id, false); | 
| 267   webkit_source.SetExtraData(media_stream_source.get()); | 269   webkit_source.SetExtraData(media_stream_source.get()); | 
| 268 | 270 | 
| 269   web_track->Initialize(webkit_source); | 271   web_track->Initialize(webkit_source); | 
| 270   web_track->SetTrackData(new MediaStreamVideoTrack( | 272   web_track->SetTrackData(new MediaStreamVideoTrack( | 
| 271       media_stream_source.release(), | 273       media_stream_source.release(), | 
| 272       MediaStreamVideoSource::ConstraintsCallback(), true)); | 274       MediaStreamVideoSource::ConstraintsCallback(), true)); | 
| 273 } | 275 } | 
| 274 | 276 | 
| 275 }  // namespace content | 277 }  // namespace content | 
| OLD | NEW | 
|---|