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

Side by Side Diff: webkit/glue/plugins/plugin_instance.cc

Issue 159296: The IPCs for carrying data requested by plugins have been changed from synchr... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/renderer/webplugin_delegate_proxy.cc ('k') | webkit/glue/plugins/plugin_stream_url.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "webkit/glue/plugins/plugin_instance.h" 7 #include "webkit/glue/plugins/plugin_instance.h"
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 const std::string& mime_type, 366 const std::string& mime_type,
367 const std::string& headers, 367 const std::string& headers,
368 uint32 expected_length, 368 uint32 expected_length,
369 uint32 last_modified) { 369 uint32 last_modified) {
370 DCHECK(load_manually_); 370 DCHECK(load_manually_);
371 std::string response_url = url; 371 std::string response_url = url;
372 if (response_url.empty()) { 372 if (response_url.empty()) {
373 response_url = instance_url_.spec(); 373 response_url = instance_url_.spec();
374 } 374 }
375 375
376 bool cancel = false;
377
378 plugin_data_stream_ = CreateStream(-1, url, mime_type, false, NULL); 376 plugin_data_stream_ = CreateStream(-1, url, mime_type, false, NULL);
379 377
380 plugin_data_stream_->DidReceiveResponse(mime_type, headers, expected_length, 378 plugin_data_stream_->DidReceiveResponse(mime_type, headers, expected_length,
381 last_modified, true, &cancel); 379 last_modified, true);
382 } 380 }
383 381
384 void PluginInstance::DidReceiveManualData(const char* buffer, int length) { 382 void PluginInstance::DidReceiveManualData(const char* buffer, int length) {
385 DCHECK(load_manually_); 383 DCHECK(load_manually_);
386 if (plugin_data_stream_.get() != NULL) { 384 if (plugin_data_stream_.get() != NULL) {
387 plugin_data_stream_->DidReceiveData(buffer, length, 0); 385 plugin_data_stream_->DidReceiveData(buffer, length, 0);
388 } 386 }
389 } 387 }
390 388
391 void PluginInstance::DidFinishManualLoading() { 389 void PluginInstance::DidFinishManualLoading() {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 stream->url, range_info.c_str(), 499 stream->url, range_info.c_str(),
502 reinterpret_cast<intptr_t>(plugin_stream), 500 reinterpret_cast<intptr_t>(plugin_stream),
503 plugin_stream->notify_needed(), 501 plugin_stream->notify_needed(),
504 reinterpret_cast<intptr_t>(plugin_stream->notify_data())); 502 reinterpret_cast<intptr_t>(plugin_stream->notify_data()));
505 break; 503 break;
506 } 504 }
507 } 505 }
508 } 506 }
509 507
510 } // namespace NPAPI 508 } // namespace NPAPI
OLDNEW
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | webkit/glue/plugins/plugin_stream_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698