summaryrefslogtreecommitdiff
path: root/chromium/net/websockets/websocket_deflate_predictor_impl.h
blob: 7b299bf4be4e308d38fa4d16ebd268567d052781 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_WEBSOCKETS_WEBSOCKET_DEFLATE_PREDICTOR_IMPL_H_
#define NET_WEBSOCKETS_WEBSOCKET_DEFLATE_PREDICTOR_IMPL_H_

#include <stddef.h>

#include <memory>
#include <vector>

#include "net/base/net_export.h"
#include "net/websockets/websocket_deflate_predictor.h"

namespace net {

struct WebSocketFrame;

class NET_EXPORT_PRIVATE WebSocketDeflatePredictorImpl
    : public WebSocketDeflatePredictor {
 public:
  ~WebSocketDeflatePredictorImpl() override = default;

  Result Predict(const std::vector<std::unique_ptr<WebSocketFrame>>& frames,
                 size_t frame_index) override;
  void RecordInputDataFrame(const WebSocketFrame* frame) override;
  void RecordWrittenDataFrame(const WebSocketFrame* frame) override;
};

}  // namespace net

#endif  // NET_WEBSOCKETS_WEBSOCKET_DEFLATE_PREDICTOR_IMPL_H_