[CSC] Avoid automatic embargo
At the moment, Captured Surface Control APIs permissions only persist
for the duration of the capture, so embargo must likewise not persist
across capture sessions.
Bug: 1521259, 1466247
Change-Id: I9ba01cb762014a0c8b0488f5c31e97deb1f3d6c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5233494
Commit-Queue: Elad Alon <[email protected]>
Reviewed-by: Andy Paicu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1251748}
diff --git a/components/permissions/permission_request.h b/components/permissions/permission_request.h
index 31b7605..eae05c47 100644
--- a/components/permissions/permission_request.h
+++ b/components/permissions/permission_request.h
@@ -60,7 +60,8 @@
PermissionRequest(PermissionRequestData request_data,
PermissionDecidedCallback permission_decided_callback,
- base::OnceClosure delete_callback);
+ base::OnceClosure delete_callback,
+ bool uses_automatic_embargo);
PermissionRequest(const PermissionRequest&) = delete;
PermissionRequest& operator=(const PermissionRequest&) = delete;
@@ -201,6 +202,8 @@
// identify the permission being requested.
virtual std::u16string GetPermissionNameTextFragment() const;
+ bool uses_automatic_embargo() const { return uses_automatic_embargo_; }
+
protected:
// Sets whether this request is permission element initiated, for testing
// subclasses only.
@@ -217,6 +220,8 @@
// caller.
base::OnceClosure delete_callback_;
+ const bool uses_automatic_embargo_ = true;
+
base::WeakPtrFactory<PermissionRequest> weak_factory_{this};
};