| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "webkit/glue/plugins/webplugin_impl.h" | 5 #include "webkit/glue/plugins/webplugin_impl.h" |
| 6 | 6 |
| 7 #include "base/linked_ptr.h" |
| 7 #include "base/logging.h" | 8 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 9 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 10 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
| 11 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 12 #include "gfx/rect.h" | 13 #include "gfx/rect.h" |
| 13 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
| 14 #include "net/base/escape.h" | 15 #include "net/base/escape.h" |
| 15 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
| 16 #include "skia/ext/platform_canvas.h" | 17 #include "skia/ext/platform_canvas.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 // Don't send the compressed content length to the plugin, which only | 201 // Don't send the compressed content length to the plugin, which only |
| 201 // cares about the decoded length. | 202 // cares about the decoded length. |
| 202 response_info->expected_length = 0; | 203 response_info->expected_length = 0; |
| 203 } | 204 } |
| 204 } | 205 } |
| 205 | 206 |
| 206 } // namespace | 207 } // namespace |
| 207 | 208 |
| 208 // WebKit::WebPlugin ---------------------------------------------------------- | 209 // WebKit::WebPlugin ---------------------------------------------------------- |
| 209 | 210 |
| 211 struct WebPluginImpl::ClientInfo { |
| 212 unsigned long id; |
| 213 WebPluginResourceClient* client; |
| 214 WebKit::WebURLRequest request; |
| 215 bool pending_failure_notification; |
| 216 linked_ptr<WebKit::WebURLLoader> loader; |
| 217 }; |
| 218 |
| 210 bool WebPluginImpl::initialize(WebPluginContainer* container) { | 219 bool WebPluginImpl::initialize(WebPluginContainer* container) { |
| 211 if (!page_delegate_) | 220 if (!page_delegate_) |
| 212 return false; | 221 return false; |
| 213 | 222 |
| 214 WebPluginDelegate* plugin_delegate = page_delegate_->CreatePluginDelegate( | 223 WebPluginDelegate* plugin_delegate = page_delegate_->CreatePluginDelegate( |
| 215 file_path_, mime_type_); | 224 file_path_, mime_type_); |
| 216 if (!plugin_delegate) | 225 if (!plugin_delegate) |
| 217 return false; | 226 return false; |
| 218 | 227 |
| 219 // Set the container before Initialize because the plugin may | 228 // Set the container before Initialize because the plugin may |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { | 1310 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { |
| 1302 if (!webframe_) | 1311 if (!webframe_) |
| 1303 return NULL; | 1312 return NULL; |
| 1304 WebView* view = webframe_->view(); | 1313 WebView* view = webframe_->view(); |
| 1305 if (!view) | 1314 if (!view) |
| 1306 return NULL; | 1315 return NULL; |
| 1307 return view->devToolsAgent(); | 1316 return view->devToolsAgent(); |
| 1308 } | 1317 } |
| 1309 | 1318 |
| 1310 } // namespace webkit_glue | 1319 } // namespace webkit_glue |
| OLD | NEW |