mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
libservo: Flesh out permissions API (#35396)
- Update the script crate to better reflect the modern Permission specifcation -- removing the necessity for an `Insecure` variant of the permissions prompt. - Have all allow/deny type requests in the internal API use an `AllowOrDeny` enum for clarity. - Expose `PermissionsRequest` and `PermissionFeature` data types to the API and use them in the delegate method. - Update both servoshell implementations to use the API. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
b72932bc88
commit
f51a5661f8
11 changed files with 211 additions and 207 deletions
|
@ -26,7 +26,7 @@ use devtools_traits::{
|
|||
DevtoolsControlMsg, DevtoolsPageInfo, LogLevel, NavigationState, NetworkEvent, PageError,
|
||||
ScriptToDevtoolsControlMsg, WorkerId,
|
||||
};
|
||||
use embedder_traits::{EmbedderMsg, EmbedderProxy};
|
||||
use embedder_traits::{AllowOrDeny, EmbedderMsg, EmbedderProxy};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use log::{debug, trace, warn};
|
||||
use serde::Serialize;
|
||||
|
@ -764,5 +764,5 @@ fn allow_devtools_client(stream: &mut TcpStream, embedder: &EmbedderProxy, token
|
|||
// No token found. Prompt user
|
||||
let (request_sender, request_receiver) = ipc::channel().expect("Failed to create IPC channel!");
|
||||
embedder.send(EmbedderMsg::RequestDevtoolsConnection(request_sender));
|
||||
request_receiver.recv().unwrap()
|
||||
request_receiver.recv().unwrap() == AllowOrDeny::Allow
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue