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

Unified Diff: content/renderer/media/media_permission_dispatcher.h

Issue 2931513003: Recreate MediaPermissionDispatcher's service connection on navigation (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/media_permission_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_permission_dispatcher.h
diff --git a/content/renderer/media/media_permission_dispatcher.h b/content/renderer/media/media_permission_dispatcher.h
index 2a94defebcb133b2bd8170b376fec1fffa30d4f7..d386eca58d0fbc7fa56d64e16b3a60406a190c43 100644
--- a/content/renderer/media/media_permission_dispatcher.h
+++ b/content/renderer/media/media_permission_dispatcher.h
@@ -33,6 +33,9 @@ class CONTENT_EXPORT MediaPermissionDispatcher : public media::MediaPermission {
const ConnectToServiceCB& connect_to_service_cb);
~MediaPermissionDispatcher() override;
+ // Called when the frame owning this MediaPermissionDispatcher is navigated.
+ void OnNavigation();
+
// media::MediaPermission implementation.
// Note: Can be called on any thread. The |permission_status_cb| will always
// be fired on the thread where these methods are called.
@@ -52,10 +55,16 @@ class CONTENT_EXPORT MediaPermissionDispatcher : public media::MediaPermission {
// PermissionService calls.
uint32_t RegisterCallback(const PermissionStatusCB& permission_status_cb);
+ // Ensure there is a connection to the permission service and return it.
+ blink::mojom::PermissionService* GetPermissionService();
+
// Callback for |permission_service_| calls.
void OnPermissionStatus(uint32_t request_id,
blink::mojom::PermissionStatus status);
+ // Callback for |permission_service_| connection errors.
+ void OnConnectionError();
+
ConnectToServiceCB connect_to_service_cb_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
uint32_t next_request_id_;
« no previous file with comments | « no previous file | content/renderer/media/media_permission_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698