| 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 WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__ | 5 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__ |
| 6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__ | 6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "webkit/glue/webplugin.h" | 9 #include "webkit/glue/webplugin.h" |
| 10 #include "webkit/glue/plugins/plugin_stream.h" | 10 #include "webkit/glue/plugins/plugin_stream.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 PluginInstance *instance, | 27 PluginInstance *instance, |
| 28 bool notify_needed, | 28 bool notify_needed, |
| 29 void *notify_data); | 29 void *notify_data); |
| 30 virtual ~PluginStreamUrl(); | 30 virtual ~PluginStreamUrl(); |
| 31 | 31 |
| 32 // Stop sending the stream to the client. | 32 // Stop sending the stream to the client. |
| 33 // Overrides the base Close so we can cancel our fetching the URL if | 33 // Overrides the base Close so we can cancel our fetching the URL if |
| 34 // it is still loading. | 34 // it is still loading. |
| 35 virtual bool Close(NPReason reason); | 35 virtual bool Close(NPReason reason); |
| 36 | 36 |
| 37 virtual WebPluginResourceClient* AsResourceClient() { |
| 38 return static_cast<WebPluginResourceClient*>(this); |
| 39 } |
| 40 |
| 41 virtual void CancelRequest(); |
| 42 |
| 37 // | 43 // |
| 38 // WebPluginResourceClient methods | 44 // WebPluginResourceClient methods |
| 39 // | 45 // |
| 40 void WillSendRequest(const GURL& url); | 46 void WillSendRequest(const GURL& url); |
| 41 void DidReceiveResponse(const std::string& mime_type, | 47 void DidReceiveResponse(const std::string& mime_type, |
| 42 const std::string& headers, | 48 const std::string& headers, |
| 43 uint32 expected_length, | 49 uint32 expected_length, |
| 44 uint32 last_modified, | 50 uint32 last_modified, |
| 45 bool* cancel); | 51 bool* cancel); |
| 46 void DidReceiveData(const char* buffer, int length); | 52 void DidReceiveData(const char* buffer, int length, int data_offset); |
| 47 void DidFinishLoading(); | 53 void DidFinishLoading(); |
| 48 void DidFail(); | 54 void DidFail(); |
| 49 | 55 |
| 56 |
| 50 private: | 57 private: |
| 51 GURL url_; | 58 GURL url_; |
| 52 int id_; | 59 int id_; |
| 53 | 60 |
| 54 DISALLOW_EVIL_CONSTRUCTORS(PluginStreamUrl); | 61 DISALLOW_EVIL_CONSTRUCTORS(PluginStreamUrl); |
| 55 }; | 62 }; |
| 56 | 63 |
| 57 } // namespace NPAPI | 64 } // namespace NPAPI |
| 58 | 65 |
| 59 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__ | 66 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__ |
| OLD | NEW |