Index: Source/core/platform/graphics/CDMSessionChromium.h |
diff --git a/Source/core/html/LinkResource.h b/Source/core/platform/graphics/CDMSessionChromium.h |
similarity index 61% |
copy from Source/core/html/LinkResource.h |
copy to Source/core/platform/graphics/CDMSessionChromium.h |
index aa3afd32b12e83dbfdff7232e542b0f0f16b1346..86337af3ff6277e89783bdeaf38cc6e0d3cc2da9 100644 |
--- a/Source/core/html/LinkResource.h |
+++ b/Source/core/platform/graphics/CDMSessionChromium.h |
@@ -28,52 +28,42 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef LinkResource_h |
-#define LinkResource_h |
+#ifndef CDMSessionChromium_h |
+#define CDMSessionChromium_h |
-#include "core/loader/cache/CachedResourceRequest.h" |
-#include "core/platform/KURL.h" |
-#include "wtf/Forward.h" |
-#include "wtf/RefCounted.h" |
+#include "core/platform/graphics/CDMSession.h" |
+#include "public/platform/WebCDMSession.h" |
+#include "wtf/OwnPtr.h" |
#include "wtf/text/WTFString.h" |
-namespace WebCore { |
+namespace WebKit { |
+class WebCDM; |
+} |
-class HTMLLinkElement; |
+namespace WebCore { |
-class LinkResource : public RefCounted<LinkResource> { |
+class CDMSessionChromium : public CDMSession, private WebKit::WebCDMSession::Client { |
abarth-chromium
2013/06/07 00:08:23
There's no need for any of these Chromium files.
ddorwin
2013/06/10 22:52:34
Done.
|
public: |
- enum Type { |
- Style, |
- Import |
- }; |
- |
- explicit LinkResource(HTMLLinkElement*); |
- virtual ~LinkResource(); |
- |
- virtual Type type() const = 0; |
- virtual void process() = 0; |
- virtual void ownerRemoved() = 0; |
+ CDMSessionChromium(WebKit::WebCDM&, CDMSessionClient*); |
+ virtual ~CDMSessionChromium() { } |
-protected: |
- HTMLLinkElement* m_owner; |
-}; |
- |
-class LinkRequestBuilder { |
-public: |
- explicit LinkRequestBuilder(HTMLLinkElement* owner); |
+ // CDMSession |
+ virtual WTF::String sessionId() const OVERRIDE; |
+ virtual void generateKeyRequest(const WTF::String& mimeType, const WTF::Uint8Array& initData) OVERRIDE; |
+ virtual void update(const WTF::Uint8Array& key) OVERRIDE; |
+ virtual void close() OVERRIDE; |
- bool isValid() const { return !m_url.isEmpty() && m_url.isValid(); } |
- const KURL& url() const { return m_url; } |
- const String& charset() const { return m_charset; } |
- CachedResourceRequest build(bool blocking) const; |
+ // WebKit::WebCDMSession::Client |
+ virtual void keyAdded() OVERRIDE; |
+ virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE; |
+ virtual void keyMessage(const unsigned char* message, unsigned messageLength, const WebKit::WebURL& destinationURL) OVERRIDE; |
private: |
- HTMLLinkElement* m_owner; |
- KURL m_url; |
- String m_charset; |
+ OwnPtr<WebKit::WebCDMSession> m_session; |
+ |
+ CDMSessionClient* m_client; |
}; |
} // namespace WebCore |
-#endif // LinkResource_h |
+#endif // CDMSessionChromium_h |