Chromium Code Reviews| 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_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ | 6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 private: | 41 private: |
| 42 using PermissionStatusCallback = mojo::Callback<void(PermissionStatus)>; | 42 using PermissionStatusCallback = mojo::Callback<void(PermissionStatus)>; |
| 43 using PermissionsStatusCallback = | 43 using PermissionsStatusCallback = |
| 44 mojo::Callback<void(mojo::Array<PermissionStatus>)>; | 44 mojo::Callback<void(mojo::Array<PermissionStatus>)>; |
| 45 | 45 |
| 46 struct PendingRequest { | 46 struct PendingRequest { |
| 47 PendingRequest(PermissionType permission, const GURL& origin, | 47 PendingRequest(PermissionType permission, const GURL& origin, |
| 48 const PermissionStatusCallback& callback); | 48 const PermissionStatusCallback& callback); |
| 49 ~PendingRequest(); | 49 ~PendingRequest(); |
| 50 | 50 |
| 51 int manager_id; | |
|
mlamouri (slow - plz ping)
2015/09/16 14:42:57
nit: rename to id to stay consistent with the subs
Lalit Maganti
2015/09/16 16:41:10
Done.
| |
| 51 PermissionType permission; | 52 PermissionType permission; |
| 52 GURL origin; | 53 GURL origin; |
| 53 PermissionStatusCallback callback; | 54 PermissionStatusCallback callback; |
| 54 }; | 55 }; |
| 55 using RequestsMap = IDMap<PendingRequest, IDMapOwnPointer>; | 56 using RequestsMap = IDMap<PendingRequest, IDMapOwnPointer>; |
| 56 | 57 |
| 57 struct PendingSubscription { | 58 struct PendingSubscription { |
| 58 PendingSubscription(PermissionType permission, const GURL& origin, | 59 PendingSubscription(PermissionType permission, const GURL& origin, |
| 59 const PermissionStatusCallback& callback); | 60 const PermissionStatusCallback& callback); |
| 60 ~PendingSubscription(); | 61 ~PendingSubscription(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 PermissionServiceContext* context_; | 108 PermissionServiceContext* context_; |
| 108 mojo::Binding<PermissionService> binding_; | 109 mojo::Binding<PermissionService> binding_; |
| 109 base::WeakPtrFactory<PermissionServiceImpl> weak_factory_; | 110 base::WeakPtrFactory<PermissionServiceImpl> weak_factory_; |
| 110 | 111 |
| 111 DISALLOW_COPY_AND_ASSIGN(PermissionServiceImpl); | 112 DISALLOW_COPY_AND_ASSIGN(PermissionServiceImpl); |
| 112 }; | 113 }; |
| 113 | 114 |
| 114 } // namespace content | 115 } // namespace content |
| 115 | 116 |
| 116 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ | 117 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ |
| OLD | NEW |