2019-11-05 23:41:20 +00:00
|
|
|
// Copyright (c) 2019 Slack Technologies, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|
|
|
|
#define SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|
|
|
|
|
|
|
|
#include "components/network_hints/browser/simple_network_hints_handler_impl.h"
|
|
|
|
|
2019-12-11 00:22:35 +00:00
|
|
|
namespace content {
|
|
|
|
class RenderFrameHost;
|
|
|
|
}
|
|
|
|
|
2019-11-05 23:41:20 +00:00
|
|
|
class NetworkHintsHandlerImpl
|
|
|
|
: public network_hints::SimpleNetworkHintsHandlerImpl {
|
|
|
|
public:
|
|
|
|
~NetworkHintsHandlerImpl() override;
|
|
|
|
|
|
|
|
static void Create(
|
2019-12-11 00:22:35 +00:00
|
|
|
content::RenderFrameHost* frame_host,
|
2019-11-05 23:41:20 +00:00
|
|
|
mojo::PendingReceiver<network_hints::mojom::NetworkHintsHandler>
|
|
|
|
receiver);
|
|
|
|
|
|
|
|
// network_hints::mojom::NetworkHintsHandler:
|
2019-12-11 00:22:35 +00:00
|
|
|
void Preconnect(const GURL& url, bool allow_credentials) override;
|
2019-11-05 23:41:20 +00:00
|
|
|
|
|
|
|
private:
|
2019-12-11 00:22:35 +00:00
|
|
|
explicit NetworkHintsHandlerImpl(content::RenderFrameHost*);
|
2019-11-05 23:41:20 +00:00
|
|
|
|
2019-12-11 00:22:35 +00:00
|
|
|
content::RenderFrameHost* render_frame_host_ = nullptr;
|
2019-11-05 23:41:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_
|