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

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

Issue 179123009: Encrypted Media: Use uint32 for systemCode in SessionError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
6 #define CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 6 #define CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Callbacks for firing session events. 74 // Callbacks for firing session events.
75 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); 75 void OnSessionCreated(uint32 session_id, const std::string& web_session_id);
76 void OnSessionMessage(uint32 session_id, 76 void OnSessionMessage(uint32 session_id,
77 const std::vector<uint8>& message, 77 const std::vector<uint8>& message,
78 const std::string& destination_url); 78 const std::string& destination_url);
79 void OnSessionReady(uint32 session_id); 79 void OnSessionReady(uint32 session_id);
80 void OnSessionClosed(uint32 session_id); 80 void OnSessionClosed(uint32 session_id);
81 void OnSessionError(uint32 session_id, 81 void OnSessionError(uint32 session_id,
82 media::MediaKeys::KeyError error_code, 82 media::MediaKeys::KeyError error_code,
83 int system_code); 83 uint32 system_code);
84 84
85 // Helper function of the callbacks. 85 // Helper function of the callbacks.
86 WebContentDecryptionModuleSessionImpl* GetSession(uint32 session_id); 86 WebContentDecryptionModuleSessionImpl* GetSession(uint32 session_id);
87 87
88 scoped_ptr<media::MediaKeys> media_keys_; 88 scoped_ptr<media::MediaKeys> media_keys_;
89 89
90 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_; 90 base::WeakPtrFactory<CdmSessionAdapter> weak_ptr_factory_;
91 91
92 SessionMap sessions_; 92 SessionMap sessions_;
93 93
94 // Session ID should be unique per renderer process for debugging purposes. 94 // Session ID should be unique per renderer process for debugging purposes.
95 static uint32 next_session_id_; 95 static uint32 next_session_id_;
96 96
97 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter); 97 DISALLOW_COPY_AND_ASSIGN(CdmSessionAdapter);
98 }; 98 };
99 99
100 } // namespace content 100 } // namespace content
101 101
102 #endif // CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_ 102 #endif // CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698