license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 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. | ||||
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 4 | |
[email protected] | 191eb3f7 | 2010-12-21 06:27:50 | [diff] [blame] | 5 | #ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_STRING_STREAM_H_ |
6 | #define WEBKIT_PLUGINS_NPAPI_PLUGIN_STRING_STREAM_H_ | ||||
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 7 | |
[email protected] | 191eb3f7 | 2010-12-21 06:27:50 | [diff] [blame] | 8 | #include "webkit/plugins/npapi/plugin_stream.h" |
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 9 | |
[email protected] | 31f4c7e | 2009-08-27 20:43:29 | [diff] [blame] | 10 | class GURL; |
11 | |||||
[email protected] | 191eb3f7 | 2010-12-21 06:27:50 | [diff] [blame] | 12 | namespace webkit { |
13 | namespace npapi { | ||||
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 14 | |
15 | class PluginInstance; | ||||
16 | |||||
17 | // An NPAPI stream from a string. | ||||
18 | class PluginStringStream : public PluginStream { | ||||
19 | public: | ||||
20 | // Create a new stream for sending to the plugin. | ||||
21 | // If notify_needed, will notify the plugin after the data has | ||||
22 | // all been sent. | ||||
[email protected] | 31f4c7e | 2009-08-27 20:43:29 | [diff] [blame] | 23 | PluginStringStream(PluginInstance* instance, |
24 | const GURL& url, | ||||
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 25 | bool notify_needed, |
[email protected] | 31f4c7e | 2009-08-27 20:43:29 | [diff] [blame] | 26 | void* notify_data); |
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 27 | |
28 | // Initiates the sending of data to the plugin. | ||||
[email protected] | 31f4c7e | 2009-08-27 20:43:29 | [diff] [blame] | 29 | void SendToPlugin(const std::string& data, |
30 | const std::string& mime_type); | ||||
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 31 | |
32 | private: | ||||
[email protected] | 122331d5 | 2009-11-05 23:40:45 | [diff] [blame] | 33 | virtual ~PluginStringStream(); |
34 | |||||
[email protected] | 31f4c7e | 2009-08-27 20:43:29 | [diff] [blame] | 35 | DISALLOW_COPY_AND_ASSIGN(PluginStringStream); |
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 36 | }; |
37 | |||||
initial.commit | f5b16fe | 2008-07-27 00:20:51 | [diff] [blame] | 38 | |
[email protected] | 191eb3f7 | 2010-12-21 06:27:50 | [diff] [blame] | 39 | } // namespace npapi |
40 | } // namespace webkit | ||||
41 | |||||
42 | #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_STRING_STREAM_H_ |