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

Side by Side Diff: webkit/plugins/npapi/webplugin_impl.cc

Issue 8349009: Support playback & seeking in media files over 2G. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « webkit/glue/multipart_response_delegate_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « webkit/glue/multipart_response_delegate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698