Import Cobalt 2.13391
diff --git a/src/cobalt/browser/web_module.cc b/src/cobalt/browser/web_module.cc
index 53fb047..3c26c18 100644
--- a/src/cobalt/browser/web_module.cc
+++ b/src/cobalt/browser/web_module.cc
@@ -389,7 +389,7 @@
environment_settings_.reset(new dom::DOMSettings(
kDOMMaxElementDepth, fetcher_factory_.get(), data.network_module, window_,
- media_source_registry_.get(), data.media_module, javascript_engine_.get(),
+ media_source_registry_.get(), javascript_engine_.get(),
global_environment_.get(), data.options.dom_settings_options));
DCHECK(environment_settings_);
diff --git a/src/cobalt/build/build.id b/src/cobalt/build/build.id
index 17f366f..7a68bfa 100644
--- a/src/cobalt/build/build.id
+++ b/src/cobalt/build/build.id
@@ -1 +1 @@
-13349
\ No newline at end of file
+13391
\ No newline at end of file
diff --git a/src/cobalt/dom/MediaSource.idl b/src/cobalt/dom/MediaSource.idl
index 65eeb35..a53419c 100644
--- a/src/cobalt/dom/MediaSource.idl
+++ b/src/cobalt/dom/MediaSource.idl
@@ -28,6 +28,4 @@
readonly attribute DOMString readyState;
[RaisesException] void endOfStream(optional DOMString error);
-
- [CallWith=EnvironmentSettings] static boolean isTypeSupported(DOMString type);
};
diff --git a/src/cobalt/dom/dom_settings.cc b/src/cobalt/dom/dom_settings.cc
index 1eca2a2..6588e93 100644
--- a/src/cobalt/dom/dom_settings.cc
+++ b/src/cobalt/dom/dom_settings.cc
@@ -26,7 +26,6 @@
network::NetworkModule* network_module,
const scoped_refptr<Window>& window,
MediaSource::Registry* media_source_registry,
- media::CanPlayTypeHandler* can_play_type_handler,
script::JavaScriptEngine* engine,
script::GlobalEnvironment* global_environment,
const Options& options)
@@ -37,7 +36,6 @@
array_buffer_allocator_(options.array_buffer_allocator),
array_buffer_cache_(options.array_buffer_cache),
media_source_registry_(media_source_registry),
- can_play_type_handler_(can_play_type_handler),
javascript_engine_(engine),
global_environment_(global_environment) {
if (array_buffer_allocator_) {
diff --git a/src/cobalt/dom/dom_settings.h b/src/cobalt/dom/dom_settings.h
index 5bd39e1..8366e67 100644
--- a/src/cobalt/dom/dom_settings.h
+++ b/src/cobalt/dom/dom_settings.h
@@ -22,7 +22,6 @@
#include "cobalt/dom/array_buffer.h"
#include "cobalt/dom/media_source.h"
#include "cobalt/dom/window.h"
-#include "cobalt/media/can_play_type_handler.h"
#include "cobalt/script/environment_settings.h"
namespace cobalt {
@@ -63,7 +62,6 @@
network::NetworkModule* network_module,
const scoped_refptr<Window>& window,
MediaSource::Registry* media_source_registry,
- media::CanPlayTypeHandler* can_play_type_handler,
script::JavaScriptEngine* engine,
script::GlobalEnvironment* global_environment_proxy,
const Options& options = Options());
@@ -97,9 +95,6 @@
MediaSource::Registry* media_source_registry() const {
return media_source_registry_;
}
- media::CanPlayTypeHandler* can_play_type_handler() const {
- return can_play_type_handler_;
- }
// An absolute URL used to resolve relative URLs.
virtual GURL base_url() const;
@@ -112,7 +107,6 @@
ArrayBuffer::Allocator* array_buffer_allocator_;
ArrayBuffer::Cache* array_buffer_cache_;
MediaSource::Registry* media_source_registry_;
- media::CanPlayTypeHandler* can_play_type_handler_;
script::JavaScriptEngine* javascript_engine_;
script::GlobalEnvironment* global_environment_;
diff --git a/src/cobalt/dom/media_source.cc b/src/cobalt/dom/media_source.cc
index f20ffb0..fa881bf 100644
--- a/src/cobalt/dom/media_source.cc
+++ b/src/cobalt/dom/media_source.cc
@@ -26,12 +26,9 @@
#include "base/logging.h"
#include "base/string_split.h"
#include "base/string_util.h"
-#include "cobalt/base/polymorphic_downcast.h"
#include "cobalt/base/tokens.h"
#include "cobalt/dom/dom_exception.h"
-#include "cobalt/dom/dom_settings.h"
#include "cobalt/dom/event.h"
-#include "cobalt/media/can_play_type_handler.h"
namespace cobalt {
namespace dom {
@@ -255,19 +252,6 @@
player_->SourceEndOfStream(eos_status);
}
-// static
-bool MediaSource::IsTypeSupported(script::EnvironmentSettings* settings,
- const std::string& type) {
- DOMSettings* dom_settings =
- base::polymorphic_downcast<DOMSettings*>(settings);
- DCHECK(dom_settings);
- media::CanPlayTypeHandler* handler = dom_settings->can_play_type_handler();
- DCHECK(handler);
- std::string result = handler->CanPlayType(type, "");
- DLOG(INFO) << "MediaSource::IsTypeSupported(" << type << ") -> " << result;
- return result == "probably";
-}
-
void MediaSource::SetPlayer(WebMediaPlayer* player) {
// It is possible to reuse a MediaSource object but unlikely. DCHECK it until
// it is used in this way.
diff --git a/src/cobalt/dom/media_source.h b/src/cobalt/dom/media_source.h
index a30e5c3..ec769e1 100644
--- a/src/cobalt/dom/media_source.h
+++ b/src/cobalt/dom/media_source.h
@@ -25,7 +25,6 @@
#include "cobalt/dom/event_target.h"
#include "cobalt/dom/source_buffer.h"
#include "cobalt/dom/source_buffer_list.h"
-#include "cobalt/script/environment_settings.h"
#include "cobalt/script/exception_state.h"
#include "media/player/web_media_player.h"
@@ -88,9 +87,6 @@
void EndOfStream(const std::string& error,
script::ExceptionState* exception_state);
- static bool IsTypeSupported(script::EnvironmentSettings* settings,
- const std::string& type);
-
// Custom, not in any spec.
//
// The player is set when the media source is attached to a media element.
diff --git a/src/cobalt/xhr/xml_http_request_test.cc b/src/cobalt/xhr/xml_http_request_test.cc
index e39fe5f..ac3b5c1 100644
--- a/src/cobalt/xhr/xml_http_request_test.cc
+++ b/src/cobalt/xhr/xml_http_request_test.cc
@@ -92,8 +92,7 @@
class FakeSettings : public dom::DOMSettings {
public:
- FakeSettings()
- : dom::DOMSettings(0, NULL, NULL, NULL, NULL, NULL, NULL, NULL) {}
+ FakeSettings() : dom::DOMSettings(0, NULL, NULL, NULL, NULL, NULL, NULL) {}
GURL base_url() const OVERRIDE { return GURL("http://example.com"); }
};