Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1816)

Side by Side Diff: media/blink/webencryptedmediaclient_impl.h

Issue 1023863002: Create an interface for KeySystems, migrate WebEncryptedMediaClientImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@robustness
Patch Set: Rebase. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/key_systems.cc ('k') | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ 5 #ifndef MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
6 #define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ 6 #define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "media/base/cdm_factory.h" 13 #include "media/base/cdm_factory.h"
14 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
15 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" 15 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
16 #include "third_party/WebKit/public/platform/WebEncryptedMediaClient.h" 16 #include "third_party/WebKit/public/platform/WebEncryptedMediaClient.h"
17 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" 17 #include "third_party/WebKit/public/web/WebSecurityOrigin.h"
18 18
19 namespace media { 19 namespace media {
20 20
21 class KeySystems;
21 class MediaPermission; 22 class MediaPermission;
22 23
23 class MEDIA_EXPORT WebEncryptedMediaClientImpl 24 class MEDIA_EXPORT WebEncryptedMediaClientImpl
24 : public blink::WebEncryptedMediaClient { 25 : public blink::WebEncryptedMediaClient {
25 public: 26 public:
26 WebEncryptedMediaClientImpl(scoped_ptr<CdmFactory> cdm_factory, 27 WebEncryptedMediaClientImpl(scoped_ptr<CdmFactory> cdm_factory,
27 MediaPermission* media_permission); 28 MediaPermission* media_permission);
28 virtual ~WebEncryptedMediaClientImpl(); 29 virtual ~WebEncryptedMediaClientImpl();
29 30
30 // WebEncryptedMediaClient implementation. 31 // WebEncryptedMediaClient implementation.
(...skipping 22 matching lines...) Expand all
53 class Reporter; 54 class Reporter;
54 55
55 // Gets the Reporter for |key_system|. If it doesn't already exist, 56 // Gets the Reporter for |key_system|. If it doesn't already exist,
56 // create one. 57 // create one.
57 Reporter* GetReporter(const std::string& key_system); 58 Reporter* GetReporter(const std::string& key_system);
58 59
59 // Key system <-> Reporter map. 60 // Key system <-> Reporter map.
60 typedef base::ScopedPtrHashMap<std::string, Reporter> Reporters; 61 typedef base::ScopedPtrHashMap<std::string, Reporter> Reporters;
61 Reporters reporters_; 62 Reporters reporters_;
62 63
64 const KeySystems& key_systems_;
63 scoped_ptr<CdmFactory> cdm_factory_; 65 scoped_ptr<CdmFactory> cdm_factory_;
64 MediaPermission* media_permission_; 66 MediaPermission* media_permission_;
65 67
66 base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_; 68 base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_;
67 }; 69 };
68 70
69 } // namespace media 71 } // namespace media
70 72
71 #endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ 73 #endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « media/base/key_systems.cc ('k') | media/blink/webencryptedmediaclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698