Index: content/browser/permissions/permission_pending_request.cc |
diff --git a/content/browser/permissions/permission_pending_request.cc b/content/browser/permissions/permission_pending_request.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5b8341b94888ecd5501f07f9bd91a62c6983670b |
--- /dev/null |
+++ b/content/browser/permissions/permission_pending_request.cc |
@@ -0,0 +1,30 @@ |
+// 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. |
+ |
+#include "content/browser/permissions/permission_pending_request.h" |
+ |
+#include "base/callback.h" |
+#include "content/public/browser/permission_manager.h" |
+#include "content/public/browser/permission_type.h" |
+ |
+namespace content { |
+ |
+PermissionPendingRequest::PermissionPendingRequest( |
+ PermissionRequestCallback callback, |
+ int request_count) : |
+ callback_(callback), |
+ request_count_(request_count) { |
+} |
+ |
+PermissionPendingRequest::~PermissionPendingRequest() { |
+ if (!callback_.is_null()) { |
+ mojo::Array<PermissionStatus> statuses = |
+ mojo::Array<PermissionStatus>::New(request_count_); |
+ for (int i = 0; i < request_count_; ++i) |
+ statuses[i] = PERMISSION_STATUS_ASK; |
mlamouri (slow - plz ping)
2015/08/21 10:24:40
DENIED is usually what we do as default value.
Lalit Maganti
2015/08/21 12:56:00
I just followed what was previously in permission_
|
+ callback_.Run(statuses.Pass()); |
+ } |
+} |
+ |
+} // namespace content |