OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "media/blink/webcontentdecryptionmoduleaccess_impl.h" | 5 #include "media/blink/webcontentdecryptionmoduleaccess_impl.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
11 #include "media/blink/webencryptedmediaclient_impl.h" | 11 #include "media/blink/webencryptedmediaclient_impl.h" |
| 12 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
12 | 13 |
13 namespace media { | 14 namespace media { |
14 | 15 |
15 // The caller owns the created cdm (passed back using |result|). | 16 // The caller owns the created cdm (passed back using |result|). |
16 static void CreateCdm(const base::WeakPtr<WebEncryptedMediaClientImpl>& client, | 17 static void CreateCdm(const base::WeakPtr<WebEncryptedMediaClientImpl>& client, |
17 const blink::WebString& key_system, | 18 const blink::WebString& key_system, |
18 bool allow_distinctive_identifier, | 19 bool allow_distinctive_identifier, |
19 bool allow_persistent_state, | 20 bool allow_persistent_state, |
20 const blink::WebSecurityOrigin& security_origin, | 21 const blink::WebSecurityOrigin& security_origin, |
21 blink::WebContentDecryptionModuleResult result) { | 22 blink::WebContentDecryptionModuleResult result) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // As this object's lifetime is controlled by MediaKeySystemAccess on the | 81 // As this object's lifetime is controlled by MediaKeySystemAccess on the |
81 // blink side, copy all values needed by CreateCdm() in case the blink object | 82 // blink side, copy all values needed by CreateCdm() in case the blink object |
82 // gets garbage-collected. | 83 // gets garbage-collected. |
83 base::MessageLoopProxy::current()->PostTask( | 84 base::MessageLoopProxy::current()->PostTask( |
84 FROM_HERE, | 85 FROM_HERE, |
85 base::Bind(&CreateCdm, client_, key_system_, allow_distinctive_identifier, | 86 base::Bind(&CreateCdm, client_, key_system_, allow_distinctive_identifier, |
86 allow_persistent_state, security_origin_, result)); | 87 allow_persistent_state, security_origin_, result)); |
87 } | 88 } |
88 | 89 |
89 } // namespace media | 90 } // namespace media |
OLD | NEW |