Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_PENDING_SINGLE_REQUEST_H_ | |
| 6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_PENDING_SINGLE_REQUEST_H_ | |
| 7 | |
| 8 #include "base/callback_forward.h" | |
| 9 #include "base/macros.h" | |
| 10 #include "content/browser/permissions/permission_pending_request.h" | |
| 11 #include "content/common/permission_service.mojom.h" | |
| 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" | |
| 13 #include "url/gurl.h" | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 enum class PermissionType; | |
| 18 | |
| 19 class PermissionPendingSingleRequest : public PermissionPendingRequest { | |
|
mlamouri (slow - plz ping)
2015/08/18 13:37:15
Could that be simplified to be a special case of m
Lalit Maganti
2015/08/20 14:23:30
I'm split about this. It would vastly reduce code
| |
| 20 public: | |
| 21 using PermissionStatusCallback = mojo::Callback<void(PermissionStatus)>; | |
| 22 | |
| 23 PermissionPendingSingleRequest( | |
| 24 PermissionType permission, | |
| 25 const GURL& origin, | |
| 26 const PermissionStatusCallback& callback); | |
| 27 ~PermissionPendingSingleRequest() override; | |
| 28 | |
| 29 void Cancel(PermissionManager* permission_manager, | |
| 30 RenderFrameHost* context, | |
| 31 int request_id) override; | |
| 32 | |
| 33 PermissionStatusCallback callback; | |
| 34 | |
| 35 private: | |
| 36 PermissionType permission; | |
| 37 GURL origin; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(PermissionPendingSingleRequest); | |
| 40 }; | |
| 41 | |
| 42 } // namespace content | |
| 43 | |
| 44 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_PENDING_SINGLE_REQUEST_H_ | |
| OLD | NEW |