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

Unified Diff: webkit/glue/plugins/plugin_stream.h

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_instance.cc ('k') | webkit/glue/plugins/plugin_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_stream.h
===================================================================
--- webkit/glue/plugins/plugin_stream.h (revision 2387)
+++ webkit/glue/plugins/plugin_stream.h (working copy)
@@ -12,6 +12,8 @@
#include "third_party/npapi/bindings/npapi.h"
+class WebPluginResourceClient;
+
namespace NPAPI {
class PluginInstance;
@@ -43,7 +45,7 @@
uint32 last_modified);
// Writes to the stream.
- int Write(const char *buf, const int len);
+ int Write(const char *buf, const int len, int data_offset);
// Write the result as a file.
void WriteAsFile();
@@ -54,10 +56,23 @@
// Close the stream.
virtual bool Close(NPReason reason);
- const NPStream* stream() const {
- return &stream_;
- }
+ virtual WebPluginResourceClient* AsResourceClient() { return NULL; }
+ // Cancels any HTTP requests initiated by the stream.
+ virtual void CancelRequest() {}
+
+ const NPStream* stream() const { return &stream_; }
+
+ // setter/getter for the seekable attribute on the stream.
+ bool seekable() const { return seekable_stream_; }
+
+ void set_seekable(bool seekable) { seekable_stream_ = seekable; }
+
+ // getters for reading the notification related attributes on the stream.
+ bool notify_needed() const { return notify_needed_; }
+
+ void* notify_data() const { return notify_data_; }
+
protected:
PluginInstance* instance() { return instance_.get(); }
// Check if the stream is open.
@@ -80,11 +95,11 @@
// Sends the data to the plugin. If it's not ready, handles buffering it
// and retrying later.
- bool WriteToPlugin(const char *buf, const int length);
+ bool WriteToPlugin(const char *buf, const int length, const int data_offset);
// Send the data to the plugin, returning how many bytes it accepted, or -1
// if an error occurred.
- int TryWriteToPlugin(const char *buf, const int length);
+ int TryWriteToPlugin(const char *buf, const int length, const int data_offset);
// The callback which calls TryWriteToPlugin.
void OnDelayDelivery();
@@ -93,7 +108,6 @@
NPStream stream_;
std::string headers_;
scoped_refptr<PluginInstance> instance_;
- int bytes_sent_;
bool notify_needed_;
void * notify_data_;
bool close_on_write_data_;
@@ -102,7 +116,9 @@
char temp_file_name_[MAX_PATH];
HANDLE temp_file_handle_;
std::vector<char> delivery_data_;
-
+ int data_offset_;
+ bool seekable_stream_;
+ std::string mime_type_;
DISALLOW_EVIL_CONSTRUCTORS(PluginStream);
};
« no previous file with comments | « webkit/glue/plugins/plugin_instance.cc ('k') | webkit/glue/plugins/plugin_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698