network_hints_handler_impl.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2019 Slack Technologies, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
  5. #define ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
  6. #include "components/network_hints/browser/simple_network_hints_handler_impl.h"
  7. namespace content {
  8. class RenderFrameHost;
  9. class BrowserContext;
  10. } // namespace content
  11. class NetworkHintsHandlerImpl
  12. : public network_hints::SimpleNetworkHintsHandlerImpl {
  13. public:
  14. ~NetworkHintsHandlerImpl() override;
  15. static void Create(
  16. content::RenderFrameHost* frame_host,
  17. mojo::PendingReceiver<network_hints::mojom::NetworkHintsHandler>
  18. receiver);
  19. // network_hints::mojom::NetworkHintsHandler:
  20. void Preconnect(const url::SchemeHostPort& url,
  21. bool allow_credentials) override;
  22. private:
  23. explicit NetworkHintsHandlerImpl(content::RenderFrameHost*);
  24. content::BrowserContext* browser_context_ = nullptr;
  25. };
  26. #endif // ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_