Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: net/spdy/spdy_frame_producer.h

Issue 13990005: [SPDY] Replace SpdyIOBuffer with new SpdyBuffer class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing include Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_buffer_unittest.cc ('k') | net/spdy/spdy_frame_producer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_SPDY_SPDY_FRAME_PRODUCER_H_
6 #define NET_SPDY_SPDY_FRAME_PRODUCER_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "net/base/net_export.h"
12
13 namespace net {
14
15 class SpdyFrame;
16
17 // An object which provides a SpdyFrame for writing. We pass these
18 // around instead of SpdyFrames since some frames have to be generated
19 // "just in time".
20 class NET_EXPORT_PRIVATE SpdyFrameProducer {
21 public:
22 SpdyFrameProducer();
23
24 // Produces the frame to be written. Will be called at most once.
25 virtual scoped_ptr<SpdyFrame> ProduceFrame() = 0;
26
27 virtual ~SpdyFrameProducer();
28
29 private:
30 DISALLOW_COPY_AND_ASSIGN(SpdyFrameProducer);
31 };
32
33 // A simple wrapper around a single SpdyFrame.
34 class NET_EXPORT_PRIVATE SimpleFrameProducer : public SpdyFrameProducer {
35 public:
36 explicit SimpleFrameProducer(scoped_ptr<SpdyFrame> frame);
37
38 virtual ~SimpleFrameProducer();
39
40 virtual scoped_ptr<SpdyFrame> ProduceFrame() OVERRIDE;
41
42 private:
43 scoped_ptr<SpdyFrame> frame_;
44
45 DISALLOW_COPY_AND_ASSIGN(SimpleFrameProducer);
46 };
47
48 } // namespace net
49
50 #endif // NET_SPDY_SPDY_FRAME_PRODUCER_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_buffer_unittest.cc ('k') | net/spdy/spdy_frame_producer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698