| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 static void ReadHttpResponseInfo(const WebCore::ResourceResponse& response, | 106 static void ReadHttpResponseInfo(const WebCore::ResourceResponse& response, |
| 107 HttpResponseInfo* http_response); | 107 HttpResponseInfo* http_response); |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 WebPluginImpl* impl_; | 110 WebPluginImpl* impl_; |
| 111 // Set to true if the next response error should be ignored. | 111 // Set to true if the next response error should be ignored. |
| 112 bool ignore_response_error_; | 112 bool ignore_response_error_; |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 // This is the WebKit side of the plugin implementation that forwards calls, | 115 // This is the WebKit side of the plugin implementation that forwards calls, |
| 116 // after changing out of WebCore types, to a delegate. The delegate will | 116 // after changing out of WebCore types, to a delegate. The delegate may |
| 117 // be in a different process. | 117 // be in a different process. |
| 118 class WebPluginImpl : public WebPlugin, | 118 class WebPluginImpl : public WebPlugin, |
| 119 public WebKit::WebURLLoaderClient { | 119 public WebKit::WebURLLoaderClient { |
| 120 public: | 120 public: |
| 121 // Creates a WebPlugin instance, as long as the delegate's initialization | 121 // Creates a WebPlugin instance, as long as the delegate's initialization |
| 122 // succeeds. If it fails, the delegate is deleted and NULL is returned. | 122 // succeeds. If it fails, the delegate is deleted and NULL is returned. |
| 123 // Note that argn and argv are UTF8. | 123 // Note that argn and argv are UTF8. |
| 124 static WebCore::Widget* Create(const GURL& url, | 124 static WebCore::Widget* Create(const GURL& url, |
| 125 char** argn, | 125 char** argn, |
| 126 char** argv, | 126 char** argv, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 141 | 141 |
| 142 private: | 142 private: |
| 143 friend class WebPluginContainer; | 143 friend class WebPluginContainer; |
| 144 | 144 |
| 145 WebPluginImpl(WebCore::HTMLPlugInElement* element, WebFrameImpl* frame, | 145 WebPluginImpl(WebCore::HTMLPlugInElement* element, WebFrameImpl* frame, |
| 146 WebPluginDelegate* delegate, const GURL& plugin_url, | 146 WebPluginDelegate* delegate, const GURL& plugin_url, |
| 147 bool load_manually, const std::string& mime_type, | 147 bool load_manually, const std::string& mime_type, |
| 148 int arg_count, char** arg_names, char** arg_values); | 148 int arg_count, char** arg_names, char** arg_values); |
| 149 | 149 |
| 150 // WebPlugin implementation: | 150 // WebPlugin implementation: |
| 151 #if defined(OS_LINUX) |
| 152 gfx::PluginWindowHandle CreatePluginContainer(); |
| 153 #endif |
| 151 void SetWindow(gfx::PluginWindowHandle window); | 154 void SetWindow(gfx::PluginWindowHandle window); |
| 152 void WillDestroyWindow(gfx::PluginWindowHandle window); | 155 void WillDestroyWindow(gfx::PluginWindowHandle window); |
| 153 #if defined(OS_WIN) | 156 #if defined(OS_WIN) |
| 154 void SetWindowlessPumpEvent(HANDLE pump_messages_event) { } | 157 void SetWindowlessPumpEvent(HANDLE pump_messages_event) { } |
| 155 #endif | 158 #endif |
| 156 | 159 |
| 157 // Given a (maybe partial) url, completes using the base url. | 160 // Given a (maybe partial) url, completes using the base url. |
| 158 bool CompleteURL(const std::string& url_in, std::string* url_out); | 161 bool CompleteURL(const std::string& url_in, std::string* url_out); |
| 159 | 162 |
| 160 // Executes the script passed in. The notify_needed and notify_data arguments | 163 // Executes the script passed in. The notify_needed and notify_data arguments |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 | 368 |
| 366 // Holds the list of argument values passed to the plugin. | 369 // Holds the list of argument values passed to the plugin. |
| 367 std::vector<std::string> arg_values_; | 370 std::vector<std::string> arg_values_; |
| 368 | 371 |
| 369 ScopedRunnableMethodFactory<WebPluginImpl> method_factory_; | 372 ScopedRunnableMethodFactory<WebPluginImpl> method_factory_; |
| 370 | 373 |
| 371 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); | 374 DISALLOW_COPY_AND_ASSIGN(WebPluginImpl); |
| 372 }; | 375 }; |
| 373 | 376 |
| 374 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ | 377 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_ |
| OLD | NEW |