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

Unified Diff: webkit/glue/plugins/plugin_host.cc

Issue 2896: This CB fixes the following issues:-... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/plugins/plugin_data_stream.cc ('k') | webkit/glue/plugins/plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_host.cc
===================================================================
--- webkit/glue/plugins/plugin_host.cc (revision 2387)
+++ webkit/glue/plugins/plugin_host.cc (working copy)
@@ -395,10 +395,19 @@
}
// Requests a range of bytes for a seekable stream.
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) {
- // TODO: implement me
- DLOG(INFO) << "NPN_RequestedRead is not implemented yet.";
- return NPERR_GENERIC_ERROR;
+NPError NPN_RequestRead(NPStream* stream, NPByteRange* range_list) {
+ if (!stream || !range_list) {
+ return NPERR_GENERIC_ERROR;
+ }
+
+ scoped_refptr<NPAPI::PluginInstance> plugin =
+ reinterpret_cast<NPAPI::PluginInstance*>(stream->ndata);
+ if (!plugin.get()) {
+ return NPERR_GENERIC_ERROR;
+ }
+
+ plugin->RequestRead(stream, range_list);
+ return NPERR_NO_ERROR;
}
static bool IsJavaScriptUrl(const std::string& url) {
« no previous file with comments | « webkit/glue/plugins/plugin_data_stream.cc ('k') | webkit/glue/plugins/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698