Index: third_party/WebKit/Source/modules/mediasession/HTMLMediaElementMediaSession.cpp |
diff --git a/third_party/WebKit/Source/modules/mediasession/HTMLMediaElementMediaSession.cpp b/third_party/WebKit/Source/modules/mediasession/HTMLMediaElementMediaSession.cpp |
deleted file mode 100644 |
index 5f575bc359c5c48c2093535358ee7c7eca033b0c..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/Source/modules/mediasession/HTMLMediaElementMediaSession.cpp |
+++ /dev/null |
@@ -1,55 +0,0 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "modules/mediasession/HTMLMediaElementMediaSession.h" |
- |
-#include "core/dom/ExceptionCode.h" |
- |
-namespace blink { |
- |
-MediaSession* HTMLMediaElementMediaSession::session(HTMLMediaElement& mediaElement) |
-{ |
- if (HTMLMediaElementMediaSession* supplement = fromIfExists(mediaElement)) |
- return supplement->m_session.get(); |
- return nullptr; |
-} |
- |
-void HTMLMediaElementMediaSession::setSession(HTMLMediaElement& mediaElement, MediaSession* session, ExceptionState& exceptionState) |
-{ |
- HTMLMediaElement::NetworkState networkState = mediaElement.getNetworkState(); |
- if (networkState == HTMLMediaElement::kNetworkIdle || networkState == HTMLMediaElement::kNetworkLoading) { |
- exceptionState.throwDOMException(InvalidStateError, "networkState must be kNetworkEmpty or kNetworkNoSource."); |
- return; |
- } |
- |
- from(mediaElement).m_session = session; |
-} |
- |
-const char* HTMLMediaElementMediaSession::supplementName() |
-{ |
- return "HTMLMediaElementMediaSession"; |
-} |
- |
-HTMLMediaElementMediaSession& HTMLMediaElementMediaSession::from(HTMLMediaElement& element) |
-{ |
- HTMLMediaElementMediaSession* supplement = fromIfExists(element); |
- if (!supplement) { |
- supplement = new HTMLMediaElementMediaSession(); |
- provideTo(element, supplementName(), supplement); |
- } |
- return *supplement; |
-} |
- |
-HTMLMediaElementMediaSession* HTMLMediaElementMediaSession::fromIfExists(HTMLMediaElement& element) |
-{ |
- return static_cast<HTMLMediaElementMediaSession*>(Supplement<HTMLMediaElement>::from(element, supplementName())); |
-} |
- |
-DEFINE_TRACE(HTMLMediaElementMediaSession) |
-{ |
- visitor->trace(m_session); |
- Supplement<HTMLMediaElement>::trace(visitor); |
-} |
- |
-} // namespace blink |