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") {
"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_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/webrtc/track_observer.h",
"platform/modules/webrtc/webrtc_logging.h",
......
......@@ -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_source.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/web_media_constraints.h"
#include "third_party/blink/public/platform/web_media_stream.h"
......@@ -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_video_device.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 "ui/gfx/geometry/size.h"
......
......@@ -485,7 +485,6 @@ jumbo_component("platform") {
"exported/platform.cc",
"exported/service_registry.cc",
"exported/url_conversion.cc",
"exported/video_capture/local_video_capturer_source.cc",
"exported/video_capture/web_video_capture_impl_manager.cc",
"exported/web_audio_bus.cc",
"exported/web_audio_device.cc",
......@@ -1336,6 +1335,8 @@ jumbo_component("platform") {
"transforms/transformation_matrix.h",
"transforms/translate_transform_operation.cc",
"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.h",
"web_test_support.cc",
......
......@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// 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 "base/bind.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/platform.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
namespace blink {
......@@ -41,10 +41,10 @@ void LocalVideoCapturerSource::StartCapture(
stop_capture_cb_ = manager_->StartCapture(
session_id_, params,
media::BindToLoop(
task_runner_,
base::BindRepeating(&LocalVideoCapturerSource::OnStateUpdate,
weak_factory_.GetWeakPtr())),
media::BindToLoop(task_runner_,
ConvertToBaseCallback(CrossThreadBindRepeating(
&LocalVideoCapturerSource::OnStateUpdate,
weak_factory_.GetWeakPtr()))),
new_frame_callback);
}
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_VIDEO_CAPTURE_LOCAL_VIDEO_CAPTURER_SOURCE_H_
#define 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_RENDERER_PLATFORM_VIDEO_CAPTURE_LOCAL_VIDEO_CAPTURER_SOURCE_H_
#include <memory>
#include <string>
......@@ -16,7 +16,8 @@
#include "media/capture/video_capture_types.h"
#include "media/capture/video_capturer_source.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 {
class SingleThreadTaskRunner;
......@@ -31,10 +32,7 @@ class WebVideoCaptureImplManager;
// WebVideoCaptureImplManager to start / stop and receive I420 frames from
// Chrome's video capture implementation. This is a main Render thread only
// object.
//
// 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
class PLATFORM_EXPORT LocalVideoCapturerSource
: public media::VideoCapturerSource {
public:
static std::unique_ptr<media::VideoCapturerSource> Create(
......@@ -85,4 +83,4 @@ class BLINK_PLATFORM_EXPORT LocalVideoCapturerSource
} // 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