| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBPLUGIN_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 // Handles NPN_URLRedirectResponse calls issued by plugins in response to | 170 // Handles NPN_URLRedirectResponse calls issued by plugins in response to |
| 171 // HTTP URL redirect notifications. | 171 // HTTP URL redirect notifications. |
| 172 virtual void URLRedirectResponse(bool allow, int resource_id) = 0; | 172 virtual void URLRedirectResponse(bool allow, int resource_id) = 0; |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 // Simpler version of ResourceHandleClient that lends itself to proxying. | 175 // Simpler version of ResourceHandleClient that lends itself to proxying. |
| 176 class WebPluginResourceClient { | 176 class WebPluginResourceClient { |
| 177 public: | 177 public: |
| 178 virtual ~WebPluginResourceClient() {} | 178 virtual ~WebPluginResourceClient() {} |
| 179 |
| 179 virtual void WillSendRequest(const GURL& url, int http_status_code) = 0; | 180 virtual void WillSendRequest(const GURL& url, int http_status_code) = 0; |
| 180 // The request_is_seekable parameter indicates whether byte range requests | 181 // The request_is_seekable parameter indicates whether byte range requests |
| 181 // can be issued for the underlying stream. | 182 // can be issued for the underlying stream. |
| 182 virtual void DidReceiveResponse(const std::string& mime_type, | 183 virtual void DidReceiveResponse(const std::string& mime_type, |
| 183 const std::string& headers, | 184 const std::string& headers, |
| 184 uint32 expected_length, | 185 uint32 expected_length, |
| 185 uint32 last_modified, | 186 uint32 last_modified, |
| 186 bool request_is_seekable) = 0; | 187 bool request_is_seekable) = 0; |
| 187 virtual void DidReceiveData(const char* buffer, int length, | 188 virtual void DidReceiveData(const char* buffer, int length, |
| 188 int data_offset) = 0; | 189 int data_offset) = 0; |
| 189 virtual void DidFinishLoading() = 0; | 190 virtual void DidFinishLoading() = 0; |
| 190 virtual void DidFail() = 0; | 191 virtual void DidFail() = 0; |
| 191 virtual bool IsMultiByteResponseExpected() = 0; | 192 virtual bool IsMultiByteResponseExpected() = 0; |
| 192 virtual int ResourceId() = 0; | 193 virtual int ResourceId() = 0; |
| 193 }; | 194 }; |
| 194 | 195 |
| 195 } // namespace npapi | 196 } // namespace npapi |
| 196 } // namespace webkit | 197 } // namespace webkit |
| 197 | 198 |
| 198 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ | 199 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_ |
| OLD | NEW |