Factored out permission_state_invocation_results API to GlobalScope

Instead of Window
This commit is contained in:
gatowololo 2019-06-27 10:23:52 -07:00 committed by Iulian Gabriel Radu
parent ad9bfc2a62
commit 24c14ac94e
3 changed files with 11 additions and 17 deletions

View file

@ -143,7 +143,6 @@ impl Permissions {
// (Revoke) Step 3.
let globalscope = self.global();
globalscope
.as_window()
.permission_state_invocation_results()
.borrow_mut()
.remove(&root_desc.name.to_string());
@ -176,7 +175,6 @@ impl Permissions {
// (Revoke) Step 3.
let globalscope = self.global();
globalscope
.as_window()
.permission_state_invocation_results()
.borrow_mut()
.remove(&root_desc.name.to_string());
@ -269,7 +267,6 @@ impl PermissionAlgorithm for Permissions {
);
globalscope
.as_window()
.permission_state_invocation_results()
.borrow_mut()
.insert(perm_name.to_string(), state);
@ -309,7 +306,6 @@ pub fn get_descriptor_permission_state(
PermissionState::Granted
} else {
settings
.as_window()
.permission_state_invocation_results()
.borrow_mut()
.remove(&permission_name.to_string());
@ -323,7 +319,6 @@ pub fn get_descriptor_permission_state(
// Step 3.
if let Some(prev_result) = settings
.as_window()
.permission_state_invocation_results()
.borrow()
.get(&permission_name.to_string())
@ -333,7 +328,6 @@ pub fn get_descriptor_permission_state(
// Store the invocation result
settings
.as_window()
.permission_state_invocation_results()
.borrow_mut()
.insert(permission_name.to_string(), state);