| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 PermissionName permission, | 56 PermissionName permission, |
| 57 const mojo::String& origin, | 57 const mojo::String& origin, |
| 58 const mojo::Callback<void(PermissionStatus)>& callback) override; | 58 const mojo::Callback<void(PermissionStatus)>& callback) override; |
| 59 | 59 |
| 60 // mojo::InterfaceImpl. | 60 // mojo::InterfaceImpl. |
| 61 void OnConnectionError() override; | 61 void OnConnectionError() override; |
| 62 | 62 |
| 63 void OnRequestPermissionResponse( | 63 void OnRequestPermissionResponse( |
| 64 const mojo::Callback<void(PermissionStatus)>& callback, | 64 const mojo::Callback<void(PermissionStatus)>& callback, |
| 65 int request_id, | 65 int request_id, |
| 66 bool allowed); | 66 PermissionStatus status); |
| 67 | 67 |
| 68 PermissionStatus GetPermissionStatus(PermissionType type, GURL origin); | 68 PermissionStatus GetPermissionStatus(PermissionType type, GURL origin); |
| 69 void ResetPermissionStatus(PermissionType type, GURL origin); | 69 void ResetPermissionStatus(PermissionType type, GURL origin); |
| 70 | 70 |
| 71 RequestsMap pending_requests_; | 71 RequestsMap pending_requests_; |
| 72 // context_ owns |this|. | 72 // context_ owns |this|. |
| 73 PermissionServiceContext* context_; | 73 PermissionServiceContext* context_; |
| 74 base::WeakPtrFactory<PermissionServiceImpl> weak_factory_; | 74 base::WeakPtrFactory<PermissionServiceImpl> weak_factory_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(PermissionServiceImpl); | 76 DISALLOW_COPY_AND_ASSIGN(PermissionServiceImpl); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace content | 79 } // namespace content |
| 80 | 80 |
| 81 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ | 81 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ |
| OLD | NEW |