| 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 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "Document.h" | 7 #include "Document.h" |
| 8 #include "DocumentLoader.h" | 8 #include "DocumentLoader.h" |
| 9 #include "Event.h" | 9 #include "Event.h" |
| 10 #include "EventNames.h" | 10 #include "EventNames.h" |
| (...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 } | 992 } |
| 993 | 993 |
| 994 DCHECK(client != NULL); | 994 DCHECK(client != NULL); |
| 995 } | 995 } |
| 996 } | 996 } |
| 997 | 997 |
| 998 client->DidReceiveResponse( | 998 client->DidReceiveResponse( |
| 999 base::SysWideToNativeMB(http_response_info.mime_type), | 999 base::SysWideToNativeMB(http_response_info.mime_type), |
| 1000 base::SysWideToNativeMB(GetAllHeaders(resource_response)), | 1000 base::SysWideToNativeMB(GetAllHeaders(resource_response)), |
| 1001 http_response_info.expected_length, | 1001 http_response_info.expected_length, |
| 1002 http_response_info.last_modified, request_is_seekable, &cancel); | 1002 http_response_info.last_modified, request_is_seekable); |
| 1003 | |
| 1004 if (cancel) { | |
| 1005 loader->cancel(); | |
| 1006 RemoveClient(loader); | |
| 1007 return; | |
| 1008 } | |
| 1009 | 1003 |
| 1010 // Bug http://b/issue?id=925559. The flash plugin would not handle the HTTP | 1004 // Bug http://b/issue?id=925559. The flash plugin would not handle the HTTP |
| 1011 // error codes in the stream header and as a result, was unaware of the | 1005 // error codes in the stream header and as a result, was unaware of the |
| 1012 // fate of the HTTP requests issued via NPN_GetURLNotify. Webkit and FF | 1006 // fate of the HTTP requests issued via NPN_GetURLNotify. Webkit and FF |
| 1013 // destroy the stream and invoke the NPP_DestroyStream function on the | 1007 // destroy the stream and invoke the NPP_DestroyStream function on the |
| 1014 // plugin if the HTTP request fails. | 1008 // plugin if the HTTP request fails. |
| 1015 const GURL& url = response.url(); | 1009 const GURL& url = response.url(); |
| 1016 if (url.SchemeIs("http") || url.SchemeIs("https")) { | 1010 if (url.SchemeIs("http") || url.SchemeIs("https")) { |
| 1017 if (response.httpStatusCode() < 100 || response.httpStatusCode() >= 400) { | 1011 if (response.httpStatusCode() < 100 || response.httpStatusCode() >= 400) { |
| 1018 // The plugin instance could be in the process of deletion here. | 1012 // The plugin instance could be in the process of deletion here. |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 | 1424 |
| 1431 WebPluginGeometry move; | 1425 WebPluginGeometry move; |
| 1432 move.window = window_; | 1426 move.window = window_; |
| 1433 move.window_rect = gfx::Rect(); | 1427 move.window_rect = gfx::Rect(); |
| 1434 move.clip_rect = gfx::Rect(); | 1428 move.clip_rect = gfx::Rect(); |
| 1435 move.rects_valid = false; | 1429 move.rects_valid = false; |
| 1436 move.visible = widget_->isVisible(); | 1430 move.visible = widget_->isVisible(); |
| 1437 | 1431 |
| 1438 webview->delegate()->DidMovePlugin(move); | 1432 webview->delegate()->DidMovePlugin(move); |
| 1439 } | 1433 } |
| OLD | NEW |