OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_WEBPLUGIN_H_ | 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_H_ |
6 #define WEBKIT_GLUE_WEBPLUGIN_H_ | 6 #define WEBKIT_GLUE_WEBPLUGIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // TODO(stuartmorgan): Move this into WebPluginProxy. | 161 // TODO(stuartmorgan): Move this into WebPluginProxy. |
162 virtual void BindFakePluginWindowHandle(bool opaque) {} | 162 virtual void BindFakePluginWindowHandle(bool opaque) {} |
163 | 163 |
164 // Returns the accelerated surface abstraction for accelerated plugins. | 164 // Returns the accelerated surface abstraction for accelerated plugins. |
165 virtual WebPluginAcceleratedSurface* GetAcceleratedSurface() { return NULL; } | 165 virtual WebPluginAcceleratedSurface* GetAcceleratedSurface() { return NULL; } |
166 #endif | 166 #endif |
167 | 167 |
168 // Gets the WebPluginDelegate that implements the interface. | 168 // Gets the WebPluginDelegate that implements the interface. |
169 // This API is only for use with Pepper, and is only overridden | 169 // This API is only for use with Pepper, and is only overridden |
170 // by in-renderer implementations. | 170 // by in-renderer implementations. |
171 virtual WebPluginDelegate* delegate() { return NULL; } | 171 virtual WebPluginDelegate* delegate(); |
172 | 172 |
173 // Handles NPN_URLRedirectResponse calls issued by plugins in response to | 173 // Handles NPN_URLRedirectResponse calls issued by plugins in response to |
174 // HTTP URL redirect notifications. | 174 // HTTP URL redirect notifications. |
175 virtual void URLRedirectResponse(bool allow, int resource_id) = 0; | 175 virtual void URLRedirectResponse(bool allow, int resource_id) = 0; |
176 }; | 176 }; |
177 | 177 |
178 // Simpler version of ResourceHandleClient that lends itself to proxying. | 178 // Simpler version of ResourceHandleClient that lends itself to proxying. |
179 class WebPluginResourceClient { | 179 class WebPluginResourceClient { |
180 public: | 180 public: |
181 virtual ~WebPluginResourceClient() {} | 181 virtual ~WebPluginResourceClient() {} |
182 virtual void WillSendRequest(const GURL& url, int http_status_code) = 0; | 182 virtual void WillSendRequest(const GURL& url, int http_status_code) = 0; |
183 // The request_is_seekable parameter indicates whether byte range requests | 183 // The request_is_seekable parameter indicates whether byte range requests |
184 // can be issued for the underlying stream. | 184 // can be issued for the underlying stream. |
185 virtual void DidReceiveResponse(const std::string& mime_type, | 185 virtual void DidReceiveResponse(const std::string& mime_type, |
186 const std::string& headers, | 186 const std::string& headers, |
187 uint32 expected_length, | 187 uint32 expected_length, |
188 uint32 last_modified, | 188 uint32 last_modified, |
189 bool request_is_seekable) = 0; | 189 bool request_is_seekable) = 0; |
190 virtual void DidReceiveData(const char* buffer, int length, | 190 virtual void DidReceiveData(const char* buffer, int length, |
191 int data_offset) = 0; | 191 int data_offset) = 0; |
192 virtual void DidFinishLoading() = 0; | 192 virtual void DidFinishLoading() = 0; |
193 virtual void DidFail() = 0; | 193 virtual void DidFail() = 0; |
194 virtual bool IsMultiByteResponseExpected() = 0; | 194 virtual bool IsMultiByteResponseExpected() = 0; |
195 virtual int ResourceId() = 0; | 195 virtual int ResourceId() = 0; |
196 }; | 196 }; |
197 | 197 |
198 } // namespace webkit_glue | 198 } // namespace webkit_glue |
199 | 199 |
200 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H_ | 200 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H_ |
OLD | NEW |