Skip to content

Commit

Permalink
Remove VideoDestination_Private and VideoSource_Private PPAPI
Browse files Browse the repository at this point in the history
Those can only be used by the old Hangouts effect plugin and it isn't
used anymore.
Since those APIs depend on URL.createObjectURL(MediaStream) which is
deprecated, it is necessary to first remove them from the codebase
in order to continue removing URL.createObjectURL(MediaStream).

Bug: 852412
Change-Id: If64e8e7259a6d51ccf89362b59c9d6fc7c890a30
Reviewed-on: https://chromium-review.googlesource.com/1099159
Commit-Queue: Florent Castelli <orphis@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588819}
  • Loading branch information
Orphis authored and Commit Bot committed Sep 5, 2018
1 parent b1a7e23 commit de49ea1
Show file tree
Hide file tree
Showing 63 changed files with 1 addition and 3,591 deletions.
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ group("gn_all") {
"//ppapi/examples/url_loader",
"//ppapi/examples/video_capture",
"//ppapi/examples/video_decode",
"//ppapi/examples/video_effects",
"//ppapi/examples/video_encode",
"//printing:printing_unittests",
"//third_party/SPIRV-Tools/src:SPIRV-Tools",
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/ppapi_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@
#include "ppapi/c/private/ppb_testing_private.h"
#include "ppapi/c/private/ppb_udp_socket_private.h"
#include "ppapi/c/private/ppb_uma_private.h"
#include "ppapi/c/private/ppb_video_destination_private.h"
#include "ppapi/c/private/ppb_video_source_private.h"
#include "ppapi/c/private/ppb_x509_certificate_private.h"
#include "ppapi/c/trusted/ppb_broker_trusted.h"
#include "ppapi/c/trusted/ppb_browser_font_trusted.h"
Expand Down
18 changes: 0 additions & 18 deletions chrome/renderer/chrome_content_renderer_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1427,24 +1427,6 @@ ChromeContentRendererClient::OverrideSpeechSynthesizer(
return std::make_unique<TtsDispatcher>(client);
}

bool ChromeContentRendererClient::AllowPepperMediaStreamAPI(
const GURL& url) {
#if defined(OS_ANDROID)
return false;
#else
// Allow access for tests.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePepperTesting)) {
return true;
}

// Allow only the Hangouts app to use the MediaStream APIs. It's OK to check
// the whitelist in the renderer, since we're only preventing access until
// these APIs are public and stable.
return (AppCategorizer::IsHangoutsUrl(url));
#endif // !defined(OS_ANDROID)
}

void ChromeContentRendererClient::AddSupportedKeySystems(
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems) {
key_systems_provider_.AddSupportedKeySystems(key_systems);
Expand Down
1 change: 0 additions & 1 deletion chrome/renderer/chrome_content_renderer_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ class ChromeContentRendererClient
std::unique_ptr<blink::WebContentSettingsClient>
CreateWorkerContentSettingsClient(
content::RenderFrame* render_frame) override;
bool AllowPepperMediaStreamAPI(const GURL& url) override;
void AddSupportedKeySystems(
std::vector<std::unique_ptr<::media::KeySystemProperties>>* key_systems)
override;
Expand Down
11 changes: 1 addition & 10 deletions chrome/renderer/chrome_content_renderer_client_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ const bool kHostedApp = true;
const char kExtensionUrl[] = "chrome-extension://extension_id/background.html";

const char kChatManifestFS[] = "filesystem:https://talkgadget.google.com/foo";
#endif

const char kChatAppURL[] = "https://talkgadget.google.com/hangouts/foo";
#endif

void AddContentTypeHandler(content::WebPluginInfo* info,
const char* mime_type,
Expand Down Expand Up @@ -304,15 +304,6 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
#endif // BUILDFLAG(ENABLE_NACL)
}

TEST_F(ChromeContentRendererClientTest, AllowPepperMediaStreamAPI) {
ChromeContentRendererClient test;
#if defined(OS_ANDROID)
EXPECT_FALSE(test.AllowPepperMediaStreamAPI(GURL(kChatAppURL)));
#else
EXPECT_TRUE(test.AllowPepperMediaStreamAPI(GURL(kChatAppURL)));
#endif
}

// SearchBouncer doesn't exist on Android.
#if !defined(OS_ANDROID)
TEST_F(ChromeContentRendererClientTest, ShouldSuppressErrorPage) {
Expand Down
8 changes: 0 additions & 8 deletions chrome/test/ppapi/ppapi_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1465,14 +1465,6 @@ TEST_PPAPI_NACL(MAYBE_VideoDecoder)

TEST_PPAPI_NACL(VideoEncoder)

// VideoDestination doesn't work in content_browsertests.
TEST_PPAPI_OUT_OF_PROCESS(VideoDestination)
TEST_PPAPI_NACL(VideoDestination)

// VideoSource doesn't work in content_browsertests.
TEST_PPAPI_OUT_OF_PROCESS(VideoSource)
TEST_PPAPI_NACL(VideoSource)

// Printing doesn't work in content_browsertests.
TEST_PPAPI_OUT_OF_PROCESS(Printing)

Expand Down
4 changes: 0 additions & 4 deletions content/public/renderer/content_renderer_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ bool ContentRendererClient::IsOriginIsolatedPepperPlugin(
return false;
}

bool ContentRendererClient::AllowPepperMediaStreamAPI(const GURL& url) {
return false;
}

void ContentRendererClient::AddSupportedKeySystems(
std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) {}

Expand Down
3 changes: 0 additions & 3 deletions content/public/renderer/content_renderer_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,6 @@ class CONTENT_EXPORT ContentRendererClient {
// language.
virtual bool IsOriginIsolatedPepperPlugin(const base::FilePath& plugin_path);

// Returns true if the page at |url| can use Pepper MediaStream APIs.
virtual bool AllowPepperMediaStreamAPI(const GURL& url);

// Allows an embedder to provide a MediaStreamRendererFactory.
virtual std::unique_ptr<MediaStreamRendererFactory>
CreateMediaStreamRendererFactory();
Expand Down
8 changes: 0 additions & 8 deletions content/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -844,20 +844,12 @@ target(link_target_type, "renderer") {

if (enable_plugins) {
sources += [
"media/pepper/pepper_to_video_track_adapter.cc",
"media/pepper/pepper_to_video_track_adapter.h",
"media/pepper/video_track_to_pepper_adapter.cc",
"media/pepper/video_track_to_pepper_adapter.h",
"pepper/pepper_media_stream_audio_track_host.cc",
"pepper/pepper_media_stream_audio_track_host.h",
"pepper/pepper_media_stream_track_host_base.cc",
"pepper/pepper_media_stream_track_host_base.h",
"pepper/pepper_media_stream_video_track_host.cc",
"pepper/pepper_media_stream_video_track_host.h",
"pepper/pepper_video_destination_host.cc",
"pepper/pepper_video_destination_host.h",
"pepper/pepper_video_source_host.cc",
"pepper/pepper_video_source_host.h",
]
}

Expand Down
250 changes: 0 additions & 250 deletions content/renderer/media/pepper/pepper_to_video_track_adapter.cc

This file was deleted.

Loading

0 comments on commit de49ea1

Please sign in to comment.