WebContentConnection.cpp 660 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2022-2024, Tim Flynn <trflynn89@ladybird.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <WebDriver/Client.h>
  7. #include <WebDriver/WebContentConnection.h>
  8. namespace WebDriver {
  9. WebContentConnection::WebContentConnection(IPC::Transport transport)
  10. : IPC::ConnectionFromClient<WebDriverClientEndpoint, WebDriverServerEndpoint>(*this, move(transport), 1)
  11. {
  12. }
  13. void WebContentConnection::die()
  14. {
  15. if (on_close)
  16. on_close();
  17. }
  18. void WebContentConnection::driver_execution_complete(Web::WebDriver::Response const& response)
  19. {
  20. if (on_driver_execution_complete)
  21. on_driver_execution_complete(response);
  22. }
  23. }