| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_ |
| 6 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_ |
| 7 | 7 |
| 8 #include "webkit/plugins/npapi/plugin_stream.h" | 8 #include "webkit/plugins/npapi/plugin_stream.h" |
| 9 #include "webkit/plugins/npapi/webplugin.h" | 9 #include "webkit/plugins/npapi/webplugin.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 | 11 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 25 PluginStreamUrl(unsigned long resource_id, | 25 PluginStreamUrl(unsigned long resource_id, |
| 26 const GURL &url, | 26 const GURL &url, |
| 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) OVERRIDE; |
| 36 | 36 |
| 37 virtual WebPluginResourceClient* AsResourceClient(); | 37 virtual WebPluginResourceClient* AsResourceClient() OVERRIDE; |
| 38 | 38 |
| 39 virtual void CancelRequest(); | 39 virtual void CancelRequest() OVERRIDE; |
| 40 | 40 |
| 41 // | 41 // |
| 42 // WebPluginResourceClient methods | 42 // WebPluginResourceClient methods |
| 43 // | 43 // |
| 44 virtual void WillSendRequest(const GURL& url, int http_status_code); | 44 virtual void WillSendRequest(const GURL& url, int http_status_code) OVERRIDE; |
| 45 virtual void DidReceiveResponse(const std::string& mime_type, | 45 virtual void DidReceiveResponse(const std::string& mime_type, |
| 46 const std::string& headers, | 46 const std::string& headers, |
| 47 uint32 expected_length, | 47 uint32 expected_length, |
| 48 uint32 last_modified, | 48 uint32 last_modified, |
| 49 bool request_is_seekable); | 49 bool request_is_seekable) OVERRIDE; |
| 50 virtual void DidReceiveData(const char* buffer, int length, int data_offset); | 50 virtual void DidReceiveData(const char* buffer, |
| 51 virtual void DidFinishLoading(); | 51 int length, |
| 52 virtual void DidFail(); | 52 int data_offset) OVERRIDE; |
| 53 virtual bool IsMultiByteResponseExpected(); | 53 virtual void DidFinishLoading() OVERRIDE; |
| 54 virtual int ResourceId(); | 54 virtual void DidFail() OVERRIDE; |
| 55 virtual bool IsMultiByteResponseExpected() OVERRIDE; |
| 56 virtual int ResourceId() OVERRIDE; |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 GURL url_; | 59 GURL url_; |
| 58 unsigned long id_; | 60 unsigned long id_; |
| 59 | 61 |
| 60 DISALLOW_COPY_AND_ASSIGN(PluginStreamUrl); | 62 DISALLOW_COPY_AND_ASSIGN(PluginStreamUrl); |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 } // namespace npapi | 65 } // namespace npapi |
| 64 } // namespace webkit | 66 } // namespace webkit |
| 65 | 67 |
| 66 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_ | 68 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_ |
| OLD | NEW |