OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_ | 5 #ifndef COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_ |
6 #define COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_ | 6 #define COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_ |
7 | 7 |
| 8 #include "base/threading/thread_checker.h" |
8 #include "content/public/browser/render_frame_host.h" | 9 #include "content/public/browser/render_frame_host.h" |
9 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
10 #include "media/mojo/interfaces/media_drm_storage.mojom.h" | 11 #include "media/mojo/interfaces/media_drm_storage.mojom.h" |
11 #include "mojo/public/cpp/bindings/binding.h" | 12 #include "mojo/public/cpp/bindings/binding.h" |
12 #include "url/origin.h" | 13 #include "url/origin.h" |
13 | 14 |
14 class PrefRegistrySimple; | 15 class PrefRegistrySimple; |
15 class PrefService; | 16 class PrefService; |
16 | 17 |
17 namespace content { | 18 namespace content { |
(...skipping 28 matching lines...) Expand all Loading... |
46 const LoadPersistentSessionCallback& callback) final; | 47 const LoadPersistentSessionCallback& callback) final; |
47 void RemovePersistentSession( | 48 void RemovePersistentSession( |
48 const std::string& session_id, | 49 const std::string& session_id, |
49 const RemovePersistentSessionCallback& callback) final; | 50 const RemovePersistentSessionCallback& callback) final; |
50 | 51 |
51 // content::WebContentsObserver implementation. | 52 // content::WebContentsObserver implementation. |
52 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) final; | 53 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) final; |
53 void DidFinishNavigation(content::NavigationHandle* navigation_handle) final; | 54 void DidFinishNavigation(content::NavigationHandle* navigation_handle) final; |
54 | 55 |
55 private: | 56 private: |
| 57 base::ThreadChecker thread_checker_; |
| 58 |
56 // Stops observing WebContents and delete |this|. | 59 // Stops observing WebContents and delete |this|. |
57 void Close(); | 60 void Close(); |
58 | 61 |
59 content::RenderFrameHost* const render_frame_host_ = nullptr; | 62 content::RenderFrameHost* const render_frame_host_ = nullptr; |
60 PrefService* const pref_service_ = nullptr; | 63 PrefService* const pref_service_ = nullptr; |
61 const url::Origin origin_; | 64 const url::Origin origin_; |
| 65 const std::string origin_string_; |
62 bool initialized_ = false; | 66 bool initialized_ = false; |
63 | 67 |
64 mojo::Binding<media::mojom::MediaDrmStorage> binding_; | 68 mojo::Binding<media::mojom::MediaDrmStorage> binding_; |
65 }; | 69 }; |
66 | 70 |
67 } // namespace cdm | 71 } // namespace cdm |
68 | 72 |
69 #endif // COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_ | 73 #endif // COMPONENTS_CDM_BROWSER_MEDIA_DRM_STORAGE_IMPL_H_ |
OLD | NEW |