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 CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 int32 height, | 127 int32 height, |
128 uint32 surface_id) = 0; | 128 uint32 surface_id) = 0; |
129 virtual void AcceleratedPluginSwappedIOSurface() = 0; | 129 virtual void AcceleratedPluginSwappedIOSurface() = 0; |
130 #endif | 130 #endif |
131 | 131 |
132 // Handles NPN_URLRedirectResponse calls issued by plugins in response to | 132 // Handles NPN_URLRedirectResponse calls issued by plugins in response to |
133 // HTTP URL redirect notifications. | 133 // HTTP URL redirect notifications. |
134 virtual void URLRedirectResponse(bool allow, int resource_id) = 0; | 134 virtual void URLRedirectResponse(bool allow, int resource_id) = 0; |
135 }; | 135 }; |
136 | 136 |
137 // Simpler version of ResourceHandleClient that lends itself to proxying. | |
138 class WebPluginResourceClient { | |
139 public: | |
140 virtual ~WebPluginResourceClient() {} | |
141 | |
142 virtual void WillSendRequest(const GURL& url, int http_status_code) = 0; | |
143 // The request_is_seekable parameter indicates whether byte range requests | |
144 // can be issued for the underlying stream. | |
145 virtual void DidReceiveResponse(const std::string& mime_type, | |
146 const std::string& headers, | |
147 uint32 expected_length, | |
148 uint32 last_modified, | |
149 bool request_is_seekable) = 0; | |
150 virtual void DidReceiveData(const char* buffer, int length, | |
151 int data_offset) = 0; | |
152 // The resource ids passed here ensures that data for range requests | |
153 // is cleared. This applies for seekable streams. | |
154 virtual void DidFinishLoading(unsigned long resource_id) = 0; | |
155 virtual void DidFail(unsigned long resource_id) = 0; | |
156 virtual bool IsMultiByteResponseExpected() = 0; | |
157 virtual int ResourceId() = 0; | |
158 // Tells this object that it will get responses from multiple resources. | |
159 // This is necessary since the plugin process uses a single instance of | |
160 // PluginStreamUrl object for multiple range requests. | |
161 virtual void AddRangeRequestResourceId(unsigned long resource_id) { } | |
162 }; | |
163 | |
164 } // namespace content | 137 } // namespace content |
165 | 138 |
166 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ | 139 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_H_ |
OLD | NEW |