| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_DATA_STREAM_H__ | |
| 6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_DATA_STREAM_H__ | |
| 7 | |
| 8 #include "webkit/glue/plugins/plugin_stream.h" | |
| 9 | |
| 10 namespace NPAPI { | |
| 11 | |
| 12 class PluginInstance; | |
| 13 | |
| 14 // A NPAPI stream based on data received from the renderer. | |
| 15 class PluginDataStream : public PluginStream { | |
| 16 public: | |
| 17 // Create a new stream for sending to the plugin. | |
| 18 PluginDataStream(PluginInstance *instance, const std::string& url, | |
| 19 const std::string& mime_type, const std::string& headers, | |
| 20 uint32 expected_length, uint32 last_modified); | |
| 21 virtual ~PluginDataStream(); | |
| 22 | |
| 23 // Initiates the sending of data to the plugin. | |
| 24 void SendToPlugin(const char* buffer, int length); | |
| 25 | |
| 26 private: | |
| 27 std::string mime_type_; | |
| 28 std::string headers_; | |
| 29 uint32 expected_length_; | |
| 30 uint32 last_modified_; | |
| 31 // This flag when set serves as an indicator that subsequent | |
| 32 // data coming from the renderer should not be handed off to the plugin. | |
| 33 bool stream_open_failed_; | |
| 34 | |
| 35 DISALLOW_EVIL_CONSTRUCTORS(PluginDataStream); | |
| 36 }; | |
| 37 | |
| 38 } // namespace NPAPI | |
| 39 | |
| 40 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_DATA_STREAM_H__ | |
| 41 | |
| 42 | |
| OLD | NEW |