| 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_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ |
| 6 #define WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 virtual void didFinishLoading(); | 80 virtual void didFinishLoading(); |
| 81 virtual void didFailLoading(const WebKit::WebURLError& error); | 81 virtual void didFailLoading(const WebKit::WebURLError& error); |
| 82 virtual void didFinishLoadingFrameRequest( | 82 virtual void didFinishLoadingFrameRequest( |
| 83 const WebKit::WebURL& url, void* notify_data); | 83 const WebKit::WebURL& url, void* notify_data); |
| 84 virtual void didFailLoadingFrameRequest( | 84 virtual void didFailLoadingFrameRequest( |
| 85 const WebKit::WebURL& url, void* notify_data, | 85 const WebKit::WebURL& url, void* notify_data, |
| 86 const WebKit::WebURLError& error); | 86 const WebKit::WebURLError& error); |
| 87 | 87 |
| 88 // WebPlugin implementation: | 88 // WebPlugin implementation: |
| 89 void SetWindow(gfx::PluginWindowHandle window); | 89 void SetWindow(gfx::PluginWindowHandle window); |
| 90 |
| 91 // Whether input events should be sent to the delegate. |
| 92 virtual void SetAcceptsInputEvents(bool accepts) { |
| 93 accepts_input_events_ = accepts; |
| 94 } |
| 95 |
| 90 void WillDestroyWindow(gfx::PluginWindowHandle window); | 96 void WillDestroyWindow(gfx::PluginWindowHandle window); |
| 91 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
| 92 void SetWindowlessPumpEvent(HANDLE pump_messages_event) { } | 98 void SetWindowlessPumpEvent(HANDLE pump_messages_event) { } |
| 93 #endif | 99 #endif |
| 94 | 100 |
| 95 // Given a (maybe partial) url, completes using the base url. | 101 // Given a (maybe partial) url, completes using the base url. |
| 96 GURL CompleteURL(const char* url); | 102 GURL CompleteURL(const char* url); |
| 97 | 103 |
| 98 // Executes the script passed in. The notify_needed and notify_data arguments | 104 // Executes the script passed in. The notify_needed and notify_data arguments |
| 99 // are passed in by the plugin process. These indicate whether the plugin | 105 // are passed in by the plugin process. These indicate whether the plugin |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Helper function to set the referrer on the request passed in. | 251 // Helper function to set the referrer on the request passed in. |
| 246 void SetReferrer(WebKit::WebURLRequest* request, Referrer referrer_flag); | 252 void SetReferrer(WebKit::WebURLRequest* request, Referrer referrer_flag); |
| 247 | 253 |
| 248 // Returns DevToolsAgent for the frame or 0. | 254 // Returns DevToolsAgent for the frame or 0. |
| 249 WebKit::WebDevToolsAgent* GetDevToolsAgent(); | 255 WebKit::WebDevToolsAgent* GetDevToolsAgent(); |
| 250 | 256 |
| 251 std::vector<ClientInfo> clients_; | 257 std::vector<ClientInfo> clients_; |
| 252 | 258 |
| 253 bool windowless_; | 259 bool windowless_; |
| 254 gfx::PluginWindowHandle window_; | 260 gfx::PluginWindowHandle window_; |
| 261 bool accepts_input_events_; |
| 255 base::WeakPtr<WebPluginPageDelegate> page_delegate_; | 262 base::WeakPtr<WebPluginPageDelegate> page_delegate_; |
| 256 WebKit::WebFrame* webframe_; | 263 WebKit::WebFrame* webframe_; |
| 257 | 264 |
| 258 WebPluginDelegate* delegate_; | 265 WebPluginDelegate* delegate_; |
| 259 | 266 |
| 260 // This is just a weak reference. | 267 // This is just a weak reference. |
| 261 WebKit::WebPluginContainer* container_; | 268 WebKit::WebPluginContainer* container_; |
| 262 | 269 |
| 263 typedef std::map<WebPluginResourceClient*, | 270 typedef std::map<WebPluginResourceClient*, |
| 264 webkit_glue::MultipartResponseDelegate*> | 271 webkit_glue::MultipartResponseDelegate*> |
| 265 MultiPartResponseHandlerMap; | 272 MultiPartResponseHandlerMap; |
| 266 // Tracks HTTP multipart response handlers instantiated for | 273 // Tracks HTTP multipart response handlers instantiated for |
| 267 // a WebPluginResourceClient instance. | 274 // a WebPluginResourceClient instance. |
| 268 MultiPartResponseHandlerMap multi_part_response_map_; | 275 MultiPartResponseHandlerMap multi_part_response_map_; |
| 269 | 276 |
| 270 // The plugin source URL. | 277 // The plugin source URL. |
| 271 GURL plugin_url_; | 278 GURL plugin_url_; |
| 272 | 279 |
| 273 // Indicates if the download would be initiated by the plugin or us. | 280 // Indicates if the download would be initiated by the plugin or us. |
| 274 bool load_manually_; | 281 bool load_manually_; |
| 275 | 282 |
| 276 // Indicates if this is the first geometry update received by the plugin. | 283 // Indicates if this is the first geometry update received by the plugin. |
| 277 bool first_geometry_update_; | 284 bool first_geometry_update_; |
| 278 | 285 |
| 279 // Set to true if the next response error should be ignored. | 286 // Set to true if the next response error should be ignored. |
| 280 bool ignore_response_error_; | 287 bool ignore_response_error_; |
| 281 | 288 |
| 282 // The current plugin geometry and clip rectangle. | 289 // The current plugin geometry and clip rectangle. |
| 283 gfx::Rect window_rect_; | 290 WebPluginGeometry geometry_; |
| 284 gfx::Rect clip_rect_; | |
| 285 | 291 |
| 286 // The mime type of the plugin. | 292 // The mime type of the plugin. |
| 287 std::string mime_type_; | 293 std::string mime_type_; |
| 288 | 294 |
| 289 // Holds the list of argument names and values passed to the plugin. We keep | 295 // Holds the list of argument names and values passed to the plugin. We keep |
| 290 // these so that we can re-initialize the plugin if we need to. | 296 // these so that we can re-initialize the plugin if we need to. |
| 291 std::vector<std::string> arg_names_; | 297 std::vector<std::string> arg_names_; |
| 292 std::vector<std::string> arg_values_; | 298 std::vector<std::string> arg_values_; |
| 293 | 299 |
| 294 ScopedRunnableMethodFactory<WebPluginImpl> method_factory_; | 300 ScopedRunnableMethodFactory<WebPluginImpl> method_factory_; |
| 295 | 301 |
| 296 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); | 302 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); |
| 297 }; | 303 }; |
| 298 | 304 |
| 299 } // namespace webkit_glue | 305 } // namespace webkit_glue |
| 300 | 306 |
| 301 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ | 307 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ |
| OLD | NEW |