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

Unified Diff: content/browser/permissions/permission_service_impl.h

Issue 1513973002: PermissionServiceContext using mojo::StrongBindingSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-geolocation-untangle
Patch Set: Created 5 years 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
Index: content/browser/permissions/permission_service_impl.h
diff --git a/content/browser/permissions/permission_service_impl.h b/content/browser/permissions/permission_service_impl.h
index 13761daca2f2ed46362010dc0c985f41fd31ed67..3ed51060d2050df0ab4ed5a8a5fbf562124d479a 100644
--- a/content/browser/permissions/permission_service_impl.h
+++ b/content/browser/permissions/permission_service_impl.h
@@ -8,13 +8,14 @@
#include "base/id_map.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "content/browser/permissions/permission_service_context.h"
#include "content/common/permission_service.mojom.h"
-#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/common/strong_binding_set.h"
+#include "url/gurl.h"
namespace content {
enum class PermissionType;
+class PermissionServiceContext;
// Implements the PermissionService Mojo interface.
// This service can be created from a RenderFrameHost or a RenderProcessHost.
@@ -33,10 +34,9 @@ class PermissionServiceImpl : public PermissionService {
void CancelPendingOperations();
protected:
- friend PermissionServiceContext;
+ friend mojo::StrongBindingSet<PermissionServiceImpl>;
- PermissionServiceImpl(PermissionServiceContext* context,
- mojo::InterfaceRequest<PermissionService> request);
+ explicit PermissionServiceImpl(PermissionServiceContext* context);
private:
using PermissionStatusCallback = mojo::Callback<void(PermissionStatus)>;
@@ -89,8 +89,6 @@ class PermissionServiceImpl : public PermissionService {
PermissionStatus last_known_status,
const PermissionStatusCallback& callback) override;
- void OnConnectionError();
-
void OnRequestPermissionResponse(
int pending_request_id,
PermissionStatus status);
@@ -111,7 +109,6 @@ class PermissionServiceImpl : public PermissionService {
SubscriptionsMap pending_subscriptions_;
// context_ owns |this|.
PermissionServiceContext* context_;
- mojo::Binding<PermissionService> binding_;
base::WeakPtrFactory<PermissionServiceImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(PermissionServiceImpl);
« no previous file with comments | « content/browser/permissions/permission_service_context.cc ('k') | content/browser/permissions/permission_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698