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

Side by Side Diff: chrome/plugin/chrome_plugin_host.cc

Issue 3053009: Pepper stream-to-file plumbing.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | « chrome/common/security_filter_peer.h ('k') | webkit/glue/media/buffered_data_source.h » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/plugin/chrome_plugin_host.h" 5 #include "chrome/plugin/chrome_plugin_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 virtual void OnReceivedResponse( 81 virtual void OnReceivedResponse(
82 const ResourceLoaderBridge::ResponseInfo& info, 82 const ResourceLoaderBridge::ResponseInfo& info,
83 bool content_filtered) { 83 bool content_filtered) {
84 response_headers_ = info.headers; 84 response_headers_ = info.headers;
85 plugin_->functions().response_funcs->start_completed( 85 plugin_->functions().response_funcs->start_completed(
86 cprequest_.get(), CPERR_SUCCESS); 86 cprequest_.get(), CPERR_SUCCESS);
87 } 87 }
88 88
89 virtual void OnDownloadedData(int len) {
90 }
91
89 virtual void OnReceivedData(const char* data, int len) { 92 virtual void OnReceivedData(const char* data, int len) {
90 response_data_.append(data, len); 93 response_data_.append(data, len);
91 if (read_buffer_) { 94 if (read_buffer_) {
92 // If we had an asynchronous operation pending, read into that buffer 95 // If we had an asynchronous operation pending, read into that buffer
93 // and inform the plugin. 96 // and inform the plugin.
94 int rv = Read(read_buffer_, read_buffer_size_); 97 int rv = Read(read_buffer_, read_buffer_size_);
95 DCHECK(rv != CPERR_IO_PENDING); 98 DCHECK(rv != CPERR_IO_PENDING);
96 read_buffer_ = NULL; 99 read_buffer_ = NULL;
97 plugin_->functions().response_funcs->read_completed( 100 plugin_->functions().response_funcs->read_completed(
98 cprequest_.get(), rv); 101 cprequest_.get(), rv);
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 715
713 response_funcs.size = sizeof(response_funcs); 716 response_funcs.size = sizeof(response_funcs);
714 response_funcs.received_redirect = CPRR_ReceivedRedirect; 717 response_funcs.received_redirect = CPRR_ReceivedRedirect;
715 response_funcs.start_completed = CPRR_StartCompleted; 718 response_funcs.start_completed = CPRR_StartCompleted;
716 response_funcs.read_completed = CPRR_ReadCompleted; 719 response_funcs.read_completed = CPRR_ReadCompleted;
717 response_funcs.upload_progress = CPRR_UploadProgress; 720 response_funcs.upload_progress = CPRR_UploadProgress;
718 } 721 }
719 722
720 return &browser_funcs; 723 return &browser_funcs;
721 } 724 }
OLDNEW
« no previous file with comments | « chrome/common/security_filter_peer.h ('k') | webkit/glue/media/buffered_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698