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