Commit 2b8a22c5 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Move LocalVideoCapturerSource out of the Blink exposed API

CL also converts an instance of base::Bind, routing it to
CrossThreadBindingRepeating.

BUG=704136,919392
R=guidou@chromium.org, haraken@chromium.org

Change-Id: Ifbc6ea703c425697f7cbfd41e854365266def511
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1736930
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684320}
parent 56e10760
...@@ -167,7 +167,6 @@ source_set("blink_headers") { ...@@ -167,7 +167,6 @@ source_set("blink_headers") {
"platform/modules/service_worker/web_service_worker_provider.h", "platform/modules/service_worker/web_service_worker_provider.h",
"platform/modules/service_worker/web_service_worker_provider_client.h", "platform/modules/service_worker/web_service_worker_provider_client.h",
"platform/modules/service_worker/web_service_worker_registration_object_info.h", "platform/modules/service_worker/web_service_worker_registration_object_info.h",
"platform/modules/video_capture/local_video_capturer_source.h",
"platform/modules/video_capture/web_video_capture_impl_manager.h", "platform/modules/video_capture/web_video_capture_impl_manager.h",
"platform/modules/webrtc/track_observer.h", "platform/modules/webrtc/track_observer.h",
"platform/modules/webrtc/webrtc_logging.h", "platform/modules/webrtc/webrtc_logging.h",
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "third_party/blink/public/platform/modules/mediastream/media_stream_audio_processor.h" #include "third_party/blink/public/platform/modules/mediastream/media_stream_audio_processor.h"
#include "third_party/blink/public/platform/modules/mediastream/media_stream_audio_source.h" #include "third_party/blink/public/platform/modules/mediastream/media_stream_audio_source.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h" #include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/modules/video_capture/local_video_capturer_source.h"
#include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h" #include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h"
#include "third_party/blink/public/platform/web_media_constraints.h" #include "third_party/blink/public/platform/web_media_constraints.h"
#include "third_party/blink/public/platform/web_media_stream.h" #include "third_party/blink/public/platform/web_media_stream.h"
...@@ -44,6 +43,7 @@ ...@@ -44,6 +43,7 @@
#include "third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_audio.h" #include "third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_audio.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.h" #include "third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.h"
#include "third_party/blink/renderer/modules/mediastream/user_media_client_impl.h" #include "third_party/blink/renderer/modules/mediastream/user_media_client_impl.h"
#include "third_party/blink/renderer/platform/video_capture/local_video_capturer_source.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h" #include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"
#include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size.h"
......
...@@ -485,7 +485,6 @@ jumbo_component("platform") { ...@@ -485,7 +485,6 @@ jumbo_component("platform") {
"exported/platform.cc", "exported/platform.cc",
"exported/service_registry.cc", "exported/service_registry.cc",
"exported/url_conversion.cc", "exported/url_conversion.cc",
"exported/video_capture/local_video_capturer_source.cc",
"exported/video_capture/web_video_capture_impl_manager.cc", "exported/video_capture/web_video_capture_impl_manager.cc",
"exported/web_audio_bus.cc", "exported/web_audio_bus.cc",
"exported/web_audio_device.cc", "exported/web_audio_device.cc",
...@@ -1336,6 +1335,8 @@ jumbo_component("platform") { ...@@ -1336,6 +1335,8 @@ jumbo_component("platform") {
"transforms/transformation_matrix.h", "transforms/transformation_matrix.h",
"transforms/translate_transform_operation.cc", "transforms/translate_transform_operation.cc",
"transforms/translate_transform_operation.h", "transforms/translate_transform_operation.h",
"video_capture/local_video_capturer_source.cc",
"video_capture/local_video_capturer_source.h",
"video_capture/video_capture_impl.cc", "video_capture/video_capture_impl.cc",
"video_capture/video_capture_impl.h", "video_capture/video_capture_impl.h",
"web_test_support.cc", "web_test_support.cc",
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "third_party/blink/public/platform/modules/video_capture/local_video_capturer_source.h" #include "third_party/blink/renderer/platform/video_capture/local_video_capturer_source.h"
#include <utility> #include <utility>
#include "base/bind.h"
#include "media/base/bind_to_current_loop.h" #include "media/base/bind_to_current_loop.h"
#include "third_party/blink/public/platform/modules/video_capture/web_video_capture_impl_manager.h" #include "third_party/blink/public/platform/modules/video_capture/web_video_capture_impl_manager.h"
#include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
namespace blink { namespace blink {
...@@ -41,10 +41,10 @@ void LocalVideoCapturerSource::StartCapture( ...@@ -41,10 +41,10 @@ void LocalVideoCapturerSource::StartCapture(
stop_capture_cb_ = manager_->StartCapture( stop_capture_cb_ = manager_->StartCapture(
session_id_, params, session_id_, params,
media::BindToLoop( media::BindToLoop(task_runner_,
task_runner_, ConvertToBaseCallback(CrossThreadBindRepeating(
base::BindRepeating(&LocalVideoCapturerSource::OnStateUpdate, &LocalVideoCapturerSource::OnStateUpdate,
weak_factory_.GetWeakPtr())), weak_factory_.GetWeakPtr()))),
new_frame_callback); new_frame_callback);
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_VIDEO_CAPTURE_LOCAL_VIDEO_CAPTURER_SOURCE_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_VIDEO_CAPTURE_LOCAL_VIDEO_CAPTURER_SOURCE_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_VIDEO_CAPTURE_LOCAL_VIDEO_CAPTURER_SOURCE_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_VIDEO_CAPTURE_LOCAL_VIDEO_CAPTURER_SOURCE_H_
#include <memory> #include <memory>
#include <string> #include <string>
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
#include "media/capture/video_capture_types.h" #include "media/capture/video_capture_types.h"
#include "media/capture/video_capturer_source.h" #include "media/capture/video_capturer_source.h"
#include "third_party/blink/public/common/media/video_capture.h" #include "third_party/blink/public/common/media/video_capture.h"
#include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace base { namespace base {
class SingleThreadTaskRunner; class SingleThreadTaskRunner;
...@@ -31,10 +32,7 @@ class WebVideoCaptureImplManager; ...@@ -31,10 +32,7 @@ class WebVideoCaptureImplManager;
// WebVideoCaptureImplManager to start / stop and receive I420 frames from // WebVideoCaptureImplManager to start / stop and receive I420 frames from
// Chrome's video capture implementation. This is a main Render thread only // Chrome's video capture implementation. This is a main Render thread only
// object. // object.
// class PLATFORM_EXPORT LocalVideoCapturerSource
// TODO(crbug.com/704136) Remove this class out of the Blink exposed API
// when its user in content/ get Onion souped - namely UserMediaProcessor.
class BLINK_PLATFORM_EXPORT LocalVideoCapturerSource
: public media::VideoCapturerSource { : public media::VideoCapturerSource {
public: public:
static std::unique_ptr<media::VideoCapturerSource> Create( static std::unique_ptr<media::VideoCapturerSource> Create(
...@@ -85,4 +83,4 @@ class BLINK_PLATFORM_EXPORT LocalVideoCapturerSource ...@@ -85,4 +83,4 @@ class BLINK_PLATFORM_EXPORT LocalVideoCapturerSource
} // namespace blink } // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_VIDEO_CAPTURE_LOCAL_VIDEO_CAPTURER_SOURCE_H_ #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_VIDEO_CAPTURE_LOCAL_VIDEO_CAPTURER_SOURCE_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment