OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "webkit/plugins/npapi/webplugin_impl.h" | 5 #include "webkit/plugins/npapi/webplugin_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/linked_ptr.h" | 8 #include "base/memory/linked_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 virtual void willSendRequest( | 109 virtual void willSendRequest( |
110 WebURLLoader*, WebURLRequest&, const WebURLResponse&) {} | 110 WebURLLoader*, WebURLRequest&, const WebURLResponse&) {} |
111 virtual void didSendData( | 111 virtual void didSendData( |
112 WebURLLoader*, unsigned long long, unsigned long long) {} | 112 WebURLLoader*, unsigned long long, unsigned long long) {} |
113 | 113 |
114 // Called when the multipart parser encounters an embedded multipart | 114 // Called when the multipart parser encounters an embedded multipart |
115 // response. | 115 // response. |
116 virtual void didReceiveResponse( | 116 virtual void didReceiveResponse( |
117 WebURLLoader*, const WebURLResponse& response) { | 117 WebURLLoader*, const WebURLResponse& response) { |
118 int instance_size; | 118 int64 instance_size; |
119 if (!MultipartResponseDelegate::ReadContentRanges( | 119 if (!MultipartResponseDelegate::ReadContentRanges( |
120 response, | 120 response, |
121 &byte_range_lower_bound_, | 121 &byte_range_lower_bound_, |
122 &byte_range_upper_bound_, | 122 &byte_range_upper_bound_, |
123 &instance_size)) { | 123 &instance_size)) { |
124 NOTREACHED(); | 124 NOTREACHED(); |
125 return; | 125 return; |
126 } | 126 } |
127 | 127 |
128 resource_response_ = response; | 128 resource_response_ = response; |
(...skipping 17 matching lines...) Expand all Loading... |
146 | 146 |
147 void Clear() { | 147 void Clear() { |
148 resource_response_.reset(); | 148 resource_response_.reset(); |
149 byte_range_lower_bound_ = 0; | 149 byte_range_lower_bound_ = 0; |
150 byte_range_upper_bound_ = 0; | 150 byte_range_upper_bound_ = 0; |
151 } | 151 } |
152 | 152 |
153 private: | 153 private: |
154 WebURLResponse resource_response_; | 154 WebURLResponse resource_response_; |
155 // The lower bound of the byte range. | 155 // The lower bound of the byte range. |
156 int byte_range_lower_bound_; | 156 int64 byte_range_lower_bound_; |
157 // The upper bound of the byte range. | 157 // The upper bound of the byte range. |
158 int byte_range_upper_bound_; | 158 int64 byte_range_upper_bound_; |
159 // The handler for the data. | 159 // The handler for the data. |
160 WebPluginResourceClient* resource_client_; | 160 WebPluginResourceClient* resource_client_; |
161 }; | 161 }; |
162 | 162 |
163 class HeaderFlattener : public WebHTTPHeaderVisitor { | 163 class HeaderFlattener : public WebHTTPHeaderVisitor { |
164 public: | 164 public: |
165 HeaderFlattener(std::string* buf) : buf_(buf) { | 165 HeaderFlattener(std::string* buf) : buf_(buf) { |
166 } | 166 } |
167 | 167 |
168 virtual void visitHeader(const WebString& name, const WebString& value) { | 168 virtual void visitHeader(const WebString& name, const WebString& value) { |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 webframe_->setReferrerForRequest(*request, plugin_url_); | 1364 webframe_->setReferrerForRequest(*request, plugin_url_); |
1365 break; | 1365 break; |
1366 | 1366 |
1367 default: | 1367 default: |
1368 break; | 1368 break; |
1369 } | 1369 } |
1370 } | 1370 } |
1371 | 1371 |
1372 } // namespace npapi | 1372 } // namespace npapi |
1373 } // namespace webkit | 1373 } // namespace webkit |
OLD | NEW |