mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add support for launching devtools server on random port
Assign random port to devtools server in case user does not specify a port explicitly and report it to the embedding layer for display to user.
This commit is contained in:
parent
6ab923c8e8
commit
94db0d61cb
10 changed files with 73 additions and 9 deletions
|
@ -87,6 +87,11 @@ const char *prompt_input(const char *message, const char *default,
|
|||
}
|
||||
}
|
||||
|
||||
void on_devtools_started(Servo::DevtoolsServerState result,
|
||||
const unsigned int port) {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height,
|
||||
float dpi, ServoDelegate &aDelegate)
|
||||
: mWindowHeight(height), mWindowWidth(width), mDelegate(aDelegate) {
|
||||
|
@ -147,6 +152,7 @@ Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height,
|
|||
c.prompt_ok_cancel = &prompt_ok_cancel;
|
||||
c.prompt_yes_no = &prompt_yes_no;
|
||||
c.prompt_input = &prompt_input;
|
||||
c.on_devtools_started = &on_devtools_started;
|
||||
|
||||
capi::register_panic_handler(&on_panic);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue