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

Side by Side Diff: media/remoting/remoting_cdm_context.h

Issue 2643253003: Media Remoting Clean-up: Less-redundant naming, style consistency, etc. (Closed)
Patch Set: REBASE Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_REMOTING_REMOTING_CDM_CONTEXT_H_ 5 #ifndef MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_
6 #define MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_ 6 #define MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_
7 7
8 #include "media/base/cdm_context.h" 8 #include "media/base/cdm_context.h"
9 9
10 namespace media { 10 namespace media {
11 namespace remoting {
11 12
12 class RemotingCdm; 13 class RemotingCdm;
13 class RemotingSourceImpl;
14 14
15 // TODO(xjz): Merge this with erickung's implementation. 15 // TODO(xjz): Merge this with erickung's implementation.
16 // TODO(miu): This class should just be merged into RemotingCdm and implement
17 // both the CDM and CdmContext interfaces.
xjz 2017/01/21 06:12:34 This is required by media owner. The following is
miu 2017/01/23 20:57:36 Interesting point. I looked into this more, and I
xjz 2017/01/23 23:08:13 sgtm.
16 class RemotingCdmContext : public CdmContext { 18 class RemotingCdmContext : public CdmContext {
17 public: 19 public:
18 explicit RemotingCdmContext(RemotingCdm* remoting_cdm); 20 explicit RemotingCdmContext(RemotingCdm* remoting_cdm);
19 ~RemotingCdmContext() override; 21 ~RemotingCdmContext() override;
20 22
21 // If |cdm_context| is an instance of RemotingCdmContext, return a type-casted 23 // If |cdm_context| is an instance of RemotingCdmContext, return a type-casted
22 // pointer to it. Otherwise, return nullptr. 24 // pointer to it. Otherwise, return nullptr.
23 static RemotingCdmContext* From(CdmContext* cdm_context); 25 static RemotingCdmContext* From(CdmContext* cdm_context);
24 26
25 RemotingSourceImpl* GetRemotingSource(); 27 RemotingCdm* cdm() const { return remoting_cdm_; }
xjz 2017/01/21 06:12:34 This accessor can access the CDM directly. I am OK
miu 2017/01/23 20:57:37 For now, I put this back to a SharedSession getter
26 28
27 // CdmContext implementations. 29 // CdmContext implementations.
28 Decryptor* GetDecryptor() override; 30 Decryptor* GetDecryptor() override;
29 int GetCdmId() const override; 31 int GetCdmId() const override;
30 void* GetClassIdentifier() const override; 32 void* GetClassIdentifier() const override;
31 33
32 private: 34 private:
33 RemotingCdm* const remoting_cdm_; // Outlives this class. 35 RemotingCdm* const remoting_cdm_; // Outlives this class.
34 36
35 DISALLOW_COPY_AND_ASSIGN(RemotingCdmContext); 37 DISALLOW_COPY_AND_ASSIGN(RemotingCdmContext);
36 }; 38 };
37 39
40 } // namespace remoting
38 } // namespace media 41 } // namespace media
39 42
40 #endif // MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_ 43 #endif // MEDIA_REMOTING_REMOTING_CDM_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698