mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +00:00
LibWeb+WebDriver: Convert WebDriver session flags to an enumeration
Rather than a list of strings, this will be easier to deal with as a bitwise enumeration.
This commit is contained in:
parent
d95be7d88c
commit
de34351ba8
Notes:
github-actions[bot]
2025-02-10 16:35:17 +00:00
Author: https://github.com/trflynn89
Commit: de34351ba8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3497
5 changed files with 20 additions and 13 deletions
|
@ -29,7 +29,7 @@ struct LaunchBrowserCallbacks;
|
|||
|
||||
class Session : public RefCounted<Session> {
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<Session>> create(NonnullRefPtr<Client> client, JsonObject& capabilities, ReadonlySpan<StringView> flags);
|
||||
static ErrorOr<NonnullRefPtr<Session>> create(NonnullRefPtr<Client> client, JsonObject& capabilities, Web::WebDriver::SessionFlags flags);
|
||||
~Session();
|
||||
|
||||
enum class AllowInvalidWindowHandle {
|
||||
|
@ -83,7 +83,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
Session(NonnullRefPtr<Client> client, JsonObject const& capabilities, String session_id, bool http);
|
||||
Session(NonnullRefPtr<Client> client, JsonObject const& capabilities, String session_id, Web::WebDriver::SessionFlags flags);
|
||||
|
||||
ErrorOr<void> start(LaunchBrowserCallbacks const&);
|
||||
|
||||
|
@ -94,7 +94,7 @@ private:
|
|||
Web::WebDriver::LadybirdOptions m_options;
|
||||
|
||||
String m_session_id;
|
||||
bool m_http { false };
|
||||
Web::WebDriver::SessionFlags m_session_flags { Web::WebDriver::SessionFlags::Default };
|
||||
|
||||
HashMap<String, Window> m_windows;
|
||||
String m_current_window_handle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue