Commit 75294fa2 authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

Remove dead code WebMediaStreamCenterClient.

Drive-by: minor lint/include fixes.

Bug: 852423
Change-Id: I7ae9b3d0bb74caaee133600eb9a88c93ff74d2ea
Reviewed-on: https://chromium-review.googlesource.com/1099166Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567256}
parent 6787d068
......@@ -7,6 +7,7 @@
#include <stddef.h>
#include <string>
#include <vector>
#include "base/command_line.h"
#include "base/logging.h"
......@@ -21,7 +22,6 @@
#include "content/renderer/media/webrtc_local_audio_source_provider.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_center_client.h"
#include "third_party/blink/public/platform/web_media_stream_source.h"
#include "third_party/blink/public/platform/web_media_stream_track.h"
#include "third_party/blink/public/platform/web_vector.h"
......@@ -99,11 +99,9 @@ void CloneNativeVideoMediaStreamTrack(
} // namespace
MediaStreamCenter::MediaStreamCenter(
blink::WebMediaStreamCenterClient* client,
PeerConnectionDependencyFactory* factory) {}
MediaStreamCenter::MediaStreamCenter() = default;
MediaStreamCenter::~MediaStreamCenter() {}
MediaStreamCenter::~MediaStreamCenter() = default;
void MediaStreamCenter::DidCreateMediaStreamTrack(
const blink::WebMediaStreamTrack& track) {
......
......@@ -5,9 +5,6 @@
#ifndef CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_CENTER_H_
#define CONTENT_RENDERER_MEDIA_STREAM_MEDIA_STREAM_CENTER_H_
#include <map>
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "content/common/content_export.h"
#include "third_party/blink/public/platform/web_media_stream.h"
......@@ -16,18 +13,13 @@
namespace blink {
class WebAudioSourceProvider;
class WebMediaStreamCenterClient;
}
namespace content {
class PeerConnectionDependencyFactory;
class CONTENT_EXPORT MediaStreamCenter : public blink::WebMediaStreamCenter {
public:
// TODO(miu): Remove these constructor args. They are no longer used.
// http://crbug.com/577874
MediaStreamCenter(blink::WebMediaStreamCenterClient* client,
PeerConnectionDependencyFactory* factory);
MediaStreamCenter();
~MediaStreamCenter() override;
private:
......
......@@ -2143,12 +2143,10 @@ RenderThreadImpl::RequestCopyOfOutputForLayoutTest(
}
std::unique_ptr<blink::WebMediaStreamCenter>
RenderThreadImpl::CreateMediaStreamCenter(
blink::WebMediaStreamCenterClient* client) {
RenderThreadImpl::CreateMediaStreamCenter() {
std::unique_ptr<blink::WebMediaStreamCenter> media_stream_center;
if (!media_stream_center) {
media_stream_center = std::make_unique<MediaStreamCenter>(
client, GetPeerConnectionDependencyFactory());
media_stream_center = std::make_unique<MediaStreamCenter>();
}
return media_stream_center;
}
......
......@@ -75,7 +75,6 @@ namespace scheduler {
class WebThreadBase;
}
class WebMediaStreamCenter;
class WebMediaStreamCenterClient;
}
namespace base {
......@@ -350,8 +349,7 @@ class CONTENT_EXPORT RenderThreadImpl
// Creates the embedder implementation of WebMediaStreamCenter.
// The resulting object is owned by WebKit and deleted by WebKit at tear-down.
std::unique_ptr<blink::WebMediaStreamCenter> CreateMediaStreamCenter(
blink::WebMediaStreamCenterClient* client);
std::unique_ptr<blink::WebMediaStreamCenter> CreateMediaStreamCenter();
BrowserPluginManager* browser_plugin_manager() const {
return browser_plugin_manager_.get();
......
......@@ -107,7 +107,6 @@
#include "third_party/blink/public/platform/web_file_info.h"
#include "third_party/blink/public/platform/web_media_recorder_handler.h"
#include "third_party/blink/public/platform/web_media_stream_center.h"
#include "third_party/blink/public/platform/web_media_stream_center_client.h"
#include "third_party/blink/public/platform/web_plugin_list_builder.h"
#include "third_party/blink/public/platform/web_rtc_certificate_generator.h"
#include "third_party/blink/public/platform/web_rtc_peer_connection_handler.h"
......@@ -168,7 +167,6 @@ using blink::WebMediaPlayer;
using blink::WebMediaRecorderHandler;
using blink::WebMediaStream;
using blink::WebMediaStreamCenter;
using blink::WebMediaStreamCenterClient;
using blink::WebMediaStreamTrack;
using blink::WebRTCPeerConnectionHandler;
using blink::WebRTCPeerConnectionHandlerClient;
......@@ -874,13 +872,12 @@ RendererBlinkPlatformImpl::CreateRTCCertificateGenerator() {
//------------------------------------------------------------------------------
std::unique_ptr<WebMediaStreamCenter>
RendererBlinkPlatformImpl::CreateMediaStreamCenter(
WebMediaStreamCenterClient* client) {
RendererBlinkPlatformImpl::CreateMediaStreamCenter() {
RenderThreadImpl* render_thread = RenderThreadImpl::current();
DCHECK(render_thread);
if (!render_thread)
return nullptr;
return render_thread->CreateMediaStreamCenter(client);
return render_thread->CreateMediaStreamCenter();
}
// static
......
......@@ -166,8 +166,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
CreateRTCCertificateGenerator() override;
std::unique_ptr<blink::WebMediaRecorderHandler> CreateMediaRecorderHandler(
scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
std::unique_ptr<blink::WebMediaStreamCenter> CreateMediaStreamCenter(
blink::WebMediaStreamCenterClient* client) override;
std::unique_ptr<blink::WebMediaStreamCenter> CreateMediaStreamCenter()
override;
std::unique_ptr<blink::WebCanvasCaptureHandler> CreateCanvasCaptureHandler(
const blink::WebSize& size,
double frame_rate,
......
......@@ -53,7 +53,6 @@ using blink::WebLocalFrame;
using blink::WebMIDIAccessor;
using blink::WebMIDIAccessorClient;
using blink::WebMediaStreamCenter;
using blink::WebMediaStreamCenterClient;
using blink::WebPlugin;
using blink::WebPluginParams;
using blink::WebRTCPeerConnectionHandler;
......
......@@ -308,7 +308,6 @@ source_set("blink_headers") {
"platform/web_media_source.h",
"platform/web_media_stream.h",
"platform/web_media_stream_center.h",
"platform/web_media_stream_center_client.h",
"platform/web_media_stream_source.h",
"platform/web_media_stream_track.h",
"platform/web_memory_coordinator.h",
......
......@@ -110,7 +110,6 @@ class WebMediaPlayer;
class WebMediaRecorderHandler;
class WebMediaStream;
class WebMediaStreamCenter;
class WebMediaStreamCenterClient;
class WebMediaStreamTrack;
class WebPluginListBuilder;
class WebPrescientNetworking;
......@@ -600,8 +599,7 @@ class BLINK_PLATFORM_EXPORT Platform {
// May return null if WebRTC functionality is not available or out of
// resources.
virtual std::unique_ptr<WebMediaStreamCenter> CreateMediaStreamCenter(
WebMediaStreamCenterClient*);
virtual std::unique_ptr<WebMediaStreamCenter> CreateMediaStreamCenter();
// Creates a WebCanvasCaptureHandler to capture Canvas output.
virtual std::unique_ptr<WebCanvasCaptureHandler>
......
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MEDIA_STREAM_CENTER_CLIENT_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MEDIA_STREAM_CENTER_CLIENT_H_
#include "third_party/blink/public/platform/web_common.h"
namespace blink {
class WebMediaStream;
class BLINK_PLATFORM_EXPORT WebMediaStreamCenterClient {
public:
virtual ~WebMediaStreamCenterClient() = default;
virtual void StopLocalMediaStream(const WebMediaStream&) = 0;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_MEDIA_STREAM_CENTER_CLIENT_H_
......@@ -213,7 +213,7 @@ Platform::CreateOffscreenGraphicsContext3DProvider(
const WebURL& top_document_url,
Platform::GraphicsInfo*) {
return nullptr;
};
}
std::unique_ptr<WebGraphicsContext3DProvider>
Platform::CreateSharedOffscreenGraphicsContext3DProvider() {
......@@ -244,8 +244,7 @@ Platform::CreateRTCCertificateGenerator() {
return nullptr;
}
std::unique_ptr<WebMediaStreamCenter> Platform::CreateMediaStreamCenter(
WebMediaStreamCenterClient*) {
std::unique_ptr<WebMediaStreamCenter> Platform::CreateMediaStreamCenter() {
return nullptr;
}
......
......@@ -53,7 +53,7 @@ MediaStreamCenter& MediaStreamCenter::Instance() {
}
MediaStreamCenter::MediaStreamCenter()
: private_(Platform::Current()->CreateMediaStreamCenter(this)) {}
: private_(Platform::Current()->CreateMediaStreamCenter()) {}
MediaStreamCenter::~MediaStreamCenter() = default;
......@@ -113,11 +113,4 @@ void MediaStreamCenter::DidStopMediaStreamSource(MediaStreamSource* source) {
private_->DidStopMediaStreamSource(source);
}
void MediaStreamCenter::StopLocalMediaStream(const WebMediaStream& web_stream) {
MediaStreamDescriptor* stream = web_stream;
MediaStreamDescriptorClient* client = stream->Client();
if (client)
client->StreamEnded();
}
} // namespace blink
......@@ -35,7 +35,6 @@
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/public/platform/web_media_stream_center_client.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator.h"
......@@ -47,15 +46,13 @@ class AudioSourceProvider;
class MediaStreamComponent;
class MediaStreamDescriptor;
class MediaStreamSource;
class WebMediaStream;
class WebMediaStreamCenter;
class PLATFORM_EXPORT MediaStreamCenter final
: public WebMediaStreamCenterClient {
class PLATFORM_EXPORT MediaStreamCenter {
USING_FAST_MALLOC(MediaStreamCenter);
public:
~MediaStreamCenter() override;
~MediaStreamCenter();
static MediaStreamCenter& Instance();
......@@ -71,9 +68,6 @@ class PLATFORM_EXPORT MediaStreamCenter final
void DidStopMediaStreamSource(MediaStreamSource*);
// blink::WebMediaStreamCenterClient
void StopLocalMediaStream(const WebMediaStream&) override;
private:
MediaStreamCenter();
......
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