Commit d38023cc authored by Florent Castelli's avatar Florent Castelli Committed by Commit Bot

Remove deprecated URL.createObjectURL(MediaStream)

Intent thread: https://groups.google.com/a/chromium.org/d/msg/blink-dev/tWzutytXsqc/lGaWCFdHAgAJ

Bug: 800767
Change-Id: Ibb8339e65abdb4cbb91549ffc4e64e18b36a0efd
Reviewed-on: https://chromium-review.googlesource.com/1097413Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Commit-Queue: Florent Castelli <orphis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589880}
parent 57c883df
...@@ -2,6 +2,6 @@ This is a testharness.js-based test. ...@@ -2,6 +2,6 @@ This is a testharness.js-based test.
FAIL webkitMediaStream interface should not exist assert_false: expected false got true FAIL webkitMediaStream interface should not exist assert_false: expected false got true
FAIL navigator.webkitGetUserMedia should not exist assert_false: expected false got true FAIL navigator.webkitGetUserMedia should not exist assert_false: expected false got true
PASS navigator.mozGetUserMedia should not exist PASS navigator.mozGetUserMedia should not exist
FAIL Passing MediaStream to URL.createObjectURL() should throw assert_throws: function "() => URL.createObjectURL(mediaStream)" did not throw PASS Passing MediaStream to URL.createObjectURL() should throw
Harness: the test ran to completion. Harness: the test ran to completion.
...@@ -522,12 +522,6 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) { ...@@ -522,12 +522,6 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) {
String("CSS cannot be loaded from `file:` URLs unless they end " String("CSS cannot be loaded from `file:` URLs unless they end "
"in a `.css` file extension.")}; "in a `.css` file extension.")};
case WebFeature::kCreateObjectURLMediaStream:
return {"CreateObjectURLMediaStreamDeprecated", kM71,
ReplacedWillBeRemoved("URL.createObjectURL with media streams",
"HTMLMediaElement.srcObject", kM71,
"5618491470118912")};
case WebFeature::kChromeLoadTimesRequestTime: case WebFeature::kChromeLoadTimesRequestTime:
case WebFeature::kChromeLoadTimesStartLoadTime: case WebFeature::kChromeLoadTimesStartLoadTime:
case WebFeature::kChromeLoadTimesCommitLoadTime: case WebFeature::kChromeLoadTimesCommitLoadTime:
......
...@@ -38,8 +38,6 @@ blink_modules_sources("mediastream") { ...@@ -38,8 +38,6 @@ blink_modules_sources("mediastream") {
"navigator_user_media.h", "navigator_user_media.h",
"overconstrained_error.cc", "overconstrained_error.cc",
"overconstrained_error.h", "overconstrained_error.h",
"url_media_stream.cc",
"url_media_stream.h",
"user_media_client.cc", "user_media_client.cc",
"user_media_client.h", "user_media_client.h",
"user_media_controller.cc", "user_media_controller.cc",
......
/*
* Copyright (C) 2013 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.
*/
#include "third_party/blink/renderer/modules/mediastream/url_media_stream.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/deprecation.h"
#include "third_party/blink/renderer/core/url/dom_url.h"
#include "third_party/blink/renderer/modules/mediastream/media_stream.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
namespace blink {
String URLMediaStream::createObjectURL(ScriptState* script_state,
MediaStream* stream) {
// Since WebWorkers cannot obtain Stream objects, we should be on the main
// thread.
DCHECK(IsMainThread());
ExecutionContext* execution_context = ExecutionContext::From(script_state);
DCHECK(execution_context);
DCHECK(stream);
Deprecation::CountDeprecation(execution_context,
WebFeature::kCreateObjectURLMediaStream);
return DOMURL::CreatePublicURL(execution_context, stream);
}
} // namespace blink
/*
* Copyright (C) 2013 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_RENDERER_MODULES_MEDIASTREAM_URL_MEDIA_STREAM_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIASTREAM_URL_MEDIA_STREAM_H_
#include "third_party/blink/renderer/platform/wtf/allocator.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
namespace blink {
class MediaStream;
class ScriptState;
class URLMediaStream {
STATIC_ONLY(URLMediaStream);
public:
static String createObjectURL(ScriptState*, MediaStream*);
};
} // namespace blink
#endif
/*
* Copyright (C) 2013 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.
*/
// An old version of Media Capture and Streams defines URL.createObjectURL:
// https://w3c.github.io/mediacapture-main/archives/20131017/getusermedia.html
// TODO(foolip): Update link if it's revived in the spec:
// https://github.com/w3c/mediacapture-main/issues/404
[
ImplementedAs=URLMediaStream
] partial interface URL {
[Exposed=(Window,DedicatedWorker,SharedWorker), CallWith=ScriptState] static DOMString createObjectURL(MediaStream stream);
};
...@@ -746,7 +746,6 @@ modules_dependency_idl_files = ...@@ -746,7 +746,6 @@ modules_dependency_idl_files =
"mediastream/navigator_display_media.idl", "mediastream/navigator_display_media.idl",
"mediastream/navigator_media_stream.idl", "mediastream/navigator_media_stream.idl",
"mediastream/navigator_user_media.idl", "mediastream/navigator_user_media.idl",
"mediastream/url_media_stream.idl",
"mediastream/window_media_stream.idl", "mediastream/window_media_stream.idl",
"navigatorcontentutils/navigator_content_utils.idl", "navigatorcontentutils/navigator_content_utils.idl",
"nfc/navigator_nfc.idl", "nfc/navigator_nfc.idl",
......
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