| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/plugins/plugin_stream.h" | 9 #include "webkit/glue/plugins/plugin_stream.h" |
| 10 #include "webkit/glue/plugins/webplugin.h" | 10 #include "webkit/glue/plugins/webplugin.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 webkit_glue::WebPluginResourceClient* AsResourceClient() { | 37 virtual webkit_glue::WebPluginResourceClient* AsResourceClient(); |
| 38 return static_cast<webkit_glue::WebPluginResourceClient*>(this); | |
| 39 } | |
| 40 | 38 |
| 41 virtual void CancelRequest(); | 39 virtual void CancelRequest(); |
| 42 | 40 |
| 43 // | 41 // |
| 44 // WebPluginResourceClient methods | 42 // WebPluginResourceClient methods |
| 45 // | 43 // |
| 46 virtual void WillSendRequest(const GURL& url, int http_status_code); | 44 virtual void WillSendRequest(const GURL& url, int http_status_code); |
| 47 virtual void DidReceiveResponse(const std::string& mime_type, | 45 virtual void DidReceiveResponse(const std::string& mime_type, |
| 48 const std::string& headers, | 46 const std::string& headers, |
| 49 uint32 expected_length, | 47 uint32 expected_length, |
| 50 uint32 last_modified, | 48 uint32 last_modified, |
| 51 bool request_is_seekable); | 49 bool request_is_seekable); |
| 52 virtual void DidReceiveData(const char* buffer, int length, int data_offset); | 50 virtual void DidReceiveData(const char* buffer, int length, int data_offset); |
| 53 virtual void DidFinishLoading(); | 51 virtual void DidFinishLoading(); |
| 54 virtual void DidFail(); | 52 virtual void DidFail(); |
| 55 virtual bool IsMultiByteResponseExpected(); | 53 virtual bool IsMultiByteResponseExpected(); |
| 56 virtual int ResourceId(); | 54 virtual int ResourceId(); |
| 57 | 55 |
| 58 private: | 56 private: |
| 59 GURL url_; | 57 GURL url_; |
| 60 unsigned long id_; | 58 unsigned long id_; |
| 61 | 59 |
| 62 DISALLOW_COPY_AND_ASSIGN(PluginStreamUrl); | 60 DISALLOW_COPY_AND_ASSIGN(PluginStreamUrl); |
| 63 }; | 61 }; |
| 64 | 62 |
| 65 } // namespace NPAPI | 63 } // namespace NPAPI |
| 66 | 64 |
| 67 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__ | 65 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__ |
| OLD | NEW |