OLD | NEW |
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_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ |
6 #define CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ | 6 #define CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
| 9 #include <set> |
9 #include <string> | 10 #include <string> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
13 #include "base/callback.h" | 14 #include "base/callback.h" |
14 #include "base/containers/scoped_ptr_hash_map.h" | 15 #include "base/containers/scoped_ptr_hash_map.h" |
15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
16 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
17 #include "content/common/media/cdm_messages_enums.h" | 18 #include "content/common/media/cdm_messages_enums.h" |
18 #include "ipc/ipc_message.h" | 19 #include "ipc/ipc_message.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 WebContents* const web_contents_; | 109 WebContents* const web_contents_; |
109 | 110 |
110 // A map from CDM IDs to managed CDMs. | 111 // A map from CDM IDs to managed CDMs. |
111 typedef base::ScopedPtrHashMap<int, media::BrowserCdm> CdmMap; | 112 typedef base::ScopedPtrHashMap<int, media::BrowserCdm> CdmMap; |
112 CdmMap cdm_map_; | 113 CdmMap cdm_map_; |
113 | 114 |
114 // Map from CDM ID to CDM's security origin. | 115 // Map from CDM ID to CDM's security origin. |
115 std::map<int, GURL> cdm_security_origin_map_; | 116 std::map<int, GURL> cdm_security_origin_map_; |
116 | 117 |
117 // Map from CDM ID to a callback to cancel the permission request. | 118 // Map from CDM ID to a callback to cancel the permission request. |
118 std::map<int, base::Closure> cdm_cancel_permision_map_; | 119 std::set<int> cdm_cancel_permision_set_; |
119 | 120 |
120 // NOTE: Weak pointers must be invalidated before all other member variables. | 121 // NOTE: Weak pointers must be invalidated before all other member variables. |
121 base::WeakPtrFactory<BrowserCdmManager> weak_ptr_factory_; | 122 base::WeakPtrFactory<BrowserCdmManager> weak_ptr_factory_; |
122 | 123 |
123 DISALLOW_COPY_AND_ASSIGN(BrowserCdmManager); | 124 DISALLOW_COPY_AND_ASSIGN(BrowserCdmManager); |
124 }; | 125 }; |
125 | 126 |
126 } // namespace content | 127 } // namespace content |
127 | 128 |
128 #endif // CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ | 129 #endif // CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_ |
OLD | NEW |