Revert of Roll src/third_party/WebKit e0eac24:489c548 (svn 193311:193320) (patchset...
[chromium-blink-merge.git] / media / blink / webcontentdecryptionmoduleaccess_impl.h
bloba70fca215bb3daa94647a50270311ae21f2d5002
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_
6 #define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_
8 #include "base/memory/weak_ptr.h"
9 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleAccess.h"
10 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
11 #include "third_party/WebKit/public/platform/WebMediaKeySystemConfiguration.h"
12 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
13 #include "third_party/WebKit/public/platform/WebString.h"
15 namespace media {
17 class WebEncryptedMediaClientImpl;
19 class WebContentDecryptionModuleAccessImpl
20 : public blink::WebContentDecryptionModuleAccess {
21 public:
22 static WebContentDecryptionModuleAccessImpl* Create(
23 const blink::WebString& key_system,
24 const blink::WebMediaKeySystemConfiguration& configuration,
25 const blink::WebSecurityOrigin& security_origin,
26 const base::WeakPtr<WebEncryptedMediaClientImpl>& client);
27 virtual ~WebContentDecryptionModuleAccessImpl();
29 // blink::WebContentDecryptionModuleAccess interface.
30 virtual blink::WebMediaKeySystemConfiguration getConfiguration();
31 virtual void createContentDecryptionModule(
32 blink::WebContentDecryptionModuleResult result);
34 private:
35 WebContentDecryptionModuleAccessImpl(
36 const blink::WebString& key_system,
37 const blink::WebMediaKeySystemConfiguration& configuration,
38 const blink::WebSecurityOrigin& security_origin,
39 const base::WeakPtr<WebEncryptedMediaClientImpl>& client);
41 blink::WebString key_system_;
42 blink::WebMediaKeySystemConfiguration configuration_;
43 blink::WebSecurityOrigin security_origin_;
45 // Keep a WeakPtr as client is owned by render_frame_impl.
46 base::WeakPtr<WebEncryptedMediaClientImpl> client_;
48 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleAccessImpl);
51 } // namespace media
53 #endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_