| 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 #include "base/gfx/rect.h" | 5 #include "base/gfx/rect.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "net/base/escape.h" | 10 #include "net/base/escape.h" |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 return; | 834 return; |
| 835 | 835 |
| 836 // If the RouteToFrame call returned a failure then inform the result | 836 // If the RouteToFrame call returned a failure then inform the result |
| 837 // back to the plugin asynchronously. | 837 // back to the plugin asynchronously. |
| 838 if ((routing_status == INVALID_URL) || | 838 if ((routing_status == INVALID_URL) || |
| 839 (routing_status == GENERAL_FAILURE)) { | 839 (routing_status == GENERAL_FAILURE)) { |
| 840 resource_client->DidFail(); | 840 resource_client->DidFail(); |
| 841 return; | 841 return; |
| 842 } | 842 } |
| 843 | 843 |
| 844 // CreateResourceClient() sends a synchronous IPC message so it's possible |
| 845 // that TearDownPluginInstance() may have been called in the nested |
| 846 // message loop. If so, don't start the request. |
| 847 if (!delegate_) |
| 848 return; |
| 849 |
| 844 InitiateHTTPRequest(resource_id, resource_client, method, buf, len, | 850 InitiateHTTPRequest(resource_id, resource_client, method, buf, len, |
| 845 complete_url, NULL, use_plugin_src_as_referrer); | 851 complete_url, NULL, use_plugin_src_as_referrer); |
| 846 } | 852 } |
| 847 } | 853 } |
| 848 | 854 |
| 849 int WebPluginImpl::GetNextResourceId() { | 855 int WebPluginImpl::GetNextResourceId() { |
| 850 static int next_id = 0; | 856 static int next_id = 0; |
| 851 return ++next_id; | 857 return ++next_id; |
| 852 } | 858 } |
| 853 | 859 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 client_index = clients_.erase(client_index); | 1057 client_index = clients_.erase(client_index); |
| 1052 } | 1058 } |
| 1053 | 1059 |
| 1054 // This needs to be called now and not in the destructor since the | 1060 // This needs to be called now and not in the destructor since the |
| 1055 // webframe_ might not be valid anymore. | 1061 // webframe_ might not be valid anymore. |
| 1056 webframe_ = NULL; | 1062 webframe_ = NULL; |
| 1057 method_factory_.RevokeAll(); | 1063 method_factory_.RevokeAll(); |
| 1058 } | 1064 } |
| 1059 | 1065 |
| 1060 } // namespace webkit_glue | 1066 } // namespace webkit_glue |
| OLD | NEW |