Chromium Code Reviews| Index: content/browser/permissions/permission_pending_single_request.h |
| diff --git a/content/browser/permissions/permission_pending_single_request.h b/content/browser/permissions/permission_pending_single_request.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..74654e8f4daca43c26007abf2fc28e581a43430f |
| --- /dev/null |
| +++ b/content/browser/permissions/permission_pending_single_request.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_PENDING_SINGLE_REQUEST_H_ |
| +#define CONTENT_BROWSER_PERMISSIONS_PERMISSION_PENDING_SINGLE_REQUEST_H_ |
| + |
| +#include "base/callback_forward.h" |
| +#include "base/macros.h" |
| +#include "content/browser/permissions/permission_pending_request.h" |
| +#include "content/common/permission_service.mojom.h" |
| +#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" |
| +#include "url/gurl.h" |
| + |
| +namespace content { |
| + |
| +enum class PermissionType; |
| + |
| +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
|
| + public: |
| + using PermissionStatusCallback = mojo::Callback<void(PermissionStatus)>; |
| + |
| + PermissionPendingSingleRequest( |
| + PermissionType permission, |
| + const GURL& origin, |
| + const PermissionStatusCallback& callback); |
| + ~PermissionPendingSingleRequest() override; |
| + |
| + void Cancel(PermissionManager* permission_manager, |
| + RenderFrameHost* context, |
| + int request_id) override; |
| + |
| + PermissionStatusCallback callback; |
| + |
| + private: |
| + PermissionType permission; |
| + GURL origin; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PermissionPendingSingleRequest); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_PENDING_SINGLE_REQUEST_H_ |