network_hints_handler_impl.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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 GURL& url, bool allow_credentials) override;
  21. private:
  22. explicit NetworkHintsHandlerImpl(content::RenderFrameHost*);
  23. content::BrowserContext* browser_context_ = nullptr;
  24. };
  25. #endif // ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_