OLD | NEW |
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 #ifndef CONTENT_CHILD_NPAPI_PLUGIN_STRING_STREAM_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_PLUGIN_STRING_STREAM_H_ |
6 #define CONTENT_CHILD_NPAPI_PLUGIN_STRING_STREAM_H_ | 6 #define CONTENT_CHILD_NPAPI_PLUGIN_STRING_STREAM_H_ |
7 | 7 |
8 #include "content/child/npapi/plugin_stream.h" | 8 #include "content/child/npapi/plugin_stream.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class PluginInstance; | 14 class PluginInstance; |
15 | 15 |
16 // An NPAPI stream from a string. | 16 // An NPAPI stream from a string. |
17 class PluginStringStream : public PluginStream { | 17 class PluginStringStream : public PluginStream { |
18 public: | 18 public: |
19 // Create a new stream for sending to the plugin. | 19 // Create a new stream for sending to the plugin. |
20 // If notify_needed, will notify the plugin after the data has | 20 // If notify_needed, will notify the plugin after the data has |
21 // all been sent. | 21 // all been sent. |
22 PluginStringStream(PluginInstance* instance, | 22 PluginStringStream(PluginInstance* instance, |
23 const GURL& url, | 23 const GURL& url); |
24 bool notify_needed, | |
25 void* notify_data); | |
26 | 24 |
27 // Initiates the sending of data to the plugin. | 25 // Initiates the sending of data to the plugin. |
28 void SendToPlugin(const std::string& data, | 26 void SendToPlugin(const std::string& data, |
29 const std::string& mime_type); | 27 const std::string& mime_type); |
30 | 28 |
31 private: | 29 private: |
32 ~PluginStringStream() override; | 30 ~PluginStringStream() override; |
33 | 31 |
34 DISALLOW_COPY_AND_ASSIGN(PluginStringStream); | 32 DISALLOW_COPY_AND_ASSIGN(PluginStringStream); |
35 }; | 33 }; |
36 | 34 |
37 | 35 |
38 } // namespace content | 36 } // namespace content |
39 | 37 |
40 #endif // CONTENT_CHILD_NPAPI_PLUGIN_STRING_STREAM_H_ | 38 #endif // CONTENT_CHILD_NPAPI_PLUGIN_STRING_STREAM_H_ |
OLD | NEW |