OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/browser/loader/resource_handler.h" | 10 #include "content/browser/loader/resource_handler.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 bool* defer) OVERRIDE; | 42 bool* defer) OVERRIDE; |
43 | 43 |
44 virtual bool OnResponseStarted(int request_id, | 44 virtual bool OnResponseStarted(int request_id, |
45 ResourceResponse* resp, | 45 ResourceResponse* resp, |
46 bool* defer) OVERRIDE; | 46 bool* defer) OVERRIDE; |
47 | 47 |
48 virtual bool OnWillStart(int request_id, | 48 virtual bool OnWillStart(int request_id, |
49 const GURL& url, | 49 const GURL& url, |
50 bool* defer) OVERRIDE; | 50 bool* defer) OVERRIDE; |
51 | 51 |
| 52 virtual bool OnBeforeNetworkStart(int request_id, |
| 53 const GURL& url, |
| 54 bool* defer) OVERRIDE; |
| 55 |
52 // Create a new buffer to store received data. | 56 // Create a new buffer to store received data. |
53 virtual bool OnWillRead(int request_id, | 57 virtual bool OnWillRead(int request_id, |
54 scoped_refptr<net::IOBuffer>* buf, | 58 scoped_refptr<net::IOBuffer>* buf, |
55 int* buf_size, | 59 int* buf_size, |
56 int min_size) OVERRIDE; | 60 int min_size) OVERRIDE; |
57 | 61 |
58 // A read was completed, forward the data to the Stream. | 62 // A read was completed, forward the data to the Stream. |
59 virtual bool OnReadCompleted(int request_id, | 63 virtual bool OnReadCompleted(int request_id, |
60 int bytes_read, | 64 int bytes_read, |
61 bool* defer) OVERRIDE; | 65 bool* defer) OVERRIDE; |
(...skipping 12 matching lines...) Expand all Loading... |
74 virtual void OnClose(Stream* stream) OVERRIDE; | 78 virtual void OnClose(Stream* stream) OVERRIDE; |
75 | 79 |
76 scoped_refptr<Stream> stream_; | 80 scoped_refptr<Stream> stream_; |
77 scoped_refptr<net::IOBuffer> read_buffer_; | 81 scoped_refptr<net::IOBuffer> read_buffer_; |
78 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler); | 82 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler); |
79 }; | 83 }; |
80 | 84 |
81 } // namespace content | 85 } // namespace content |
82 | 86 |
83 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 87 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
OLD | NEW |