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

Side by Side Diff: content/renderer/media/webcontentdecryptionmodule_impl.h

Issue 380953002: Set callback interface on WebCDMSessionImpl after creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + change Created 6 years, 5 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
OLDNEW
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 #ifndef CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // after WebContentDecryptionModule is freed. http://crbug.com/330324 52 // after WebContentDecryptionModule is freed. http://crbug.com/330324
53 media::Decryptor* GetDecryptor(); 53 media::Decryptor* GetDecryptor();
54 54
55 #if defined(ENABLE_BROWSER_CDMS) 55 #if defined(ENABLE_BROWSER_CDMS)
56 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no 56 // Returns the CDM ID associated with this object. May be kInvalidCdmId if no
57 // CDM ID is associated, such as when Clear Key is used. 57 // CDM ID is associated, such as when Clear Key is used.
58 int GetCdmId() const; 58 int GetCdmId() const;
59 #endif // defined(ENABLE_BROWSER_CDMS) 59 #endif // defined(ENABLE_BROWSER_CDMS)
60 60
61 // blink::WebContentDecryptionModule implementation. 61 // blink::WebContentDecryptionModule implementation.
62 virtual blink::WebContentDecryptionModuleSession* createSession();
63 // TODO(jrummell): Remove this method once blink updated.
62 virtual blink::WebContentDecryptionModuleSession* createSession( 64 virtual blink::WebContentDecryptionModuleSession* createSession(
63 blink::WebContentDecryptionModuleSession::Client* client); 65 blink::WebContentDecryptionModuleSession::Client* client);
64 66
65 private: 67 private:
66 // Takes reference to |adapter|. 68 // Takes reference to |adapter|.
67 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter); 69 WebContentDecryptionModuleImpl(scoped_refptr<CdmSessionAdapter> adapter);
68 70
69 scoped_refptr<CdmSessionAdapter> adapter_; 71 scoped_refptr<CdmSessionAdapter> adapter_;
70 72
71 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl); 73 DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleImpl);
72 }; 74 };
73 75
74 // Allow typecasting from blink type as this is the only implementation. 76 // Allow typecasting from blink type as this is the only implementation.
75 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl( 77 inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl(
76 blink::WebContentDecryptionModule* cdm) { 78 blink::WebContentDecryptionModule* cdm) {
77 return static_cast<WebContentDecryptionModuleImpl*>(cdm); 79 return static_cast<WebContentDecryptionModuleImpl*>(cdm);
78 } 80 }
79 81
80 } // namespace content 82 } // namespace content
81 83
82 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_ 84 #endif // CONTENT_RENDERER_MEDIA_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/cdm_session_adapter.cc ('k') | content/renderer/media/webcontentdecryptionmodule_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698