OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 for (size_t i = 0; i < plugin.mime_types.size(); ++i) { | 346 for (size_t i = 0; i < plugin.mime_types.size(); ++i) { |
347 if (plugin.mime_types[i].mime_type == actual_mime_type) { | 347 if (plugin.mime_types[i].mime_type == actual_mime_type) { |
348 AppendParams(plugin.mime_types[i].additional_param_names, | 348 AppendParams(plugin.mime_types[i].additional_param_names, |
349 plugin.mime_types[i].additional_param_values, | 349 plugin.mime_types[i].additional_param_values, |
350 ¶ms.attributeNames, | 350 ¶ms.attributeNames, |
351 ¶ms.attributeValues); | 351 ¶ms.attributeValues); |
352 break; | 352 break; |
353 } | 353 } |
354 } | 354 } |
355 | 355 |
| 356 if (params.mimeType.isNull() && (actual_mime_type.size() > 0)) { |
| 357 // Webkit might say that mime type is null while we already know the |
| 358 // actual mime type via ChromeViewHostMsg_GetPluginInfo. In that case |
| 359 // we should use what we know since WebpluginDelegateProxy does some |
| 360 // specific initializations based on this information. |
| 361 params.mimeType = WebString::fromUTF8(actual_mime_type.c_str()); |
| 362 } |
| 363 |
356 if (status.value == | 364 if (status.value == |
357 ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked) { | 365 ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked) { |
358 render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( | 366 render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( |
359 render_view->GetRoutingId(), group->GetGroupName(), | 367 render_view->GetRoutingId(), group->GetGroupName(), |
360 GURL(group->GetUpdateURL()))); | 368 GURL(group->GetUpdateURL()))); |
361 } | 369 } |
362 if (status.value == | 370 if (status.value == |
363 ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked || | 371 ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedBlocked || |
364 status.value == | 372 status.value == |
365 ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedDisallowed) { | 373 ChromeViewHostMsg_GetPluginInfo_Status::kOutdatedDisallowed) { |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 818 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
811 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 819 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
812 } | 820 } |
813 | 821 |
814 bool ChromeContentRendererClient::AllowSocketAPI(const GURL& url) { | 822 bool ChromeContentRendererClient::AllowSocketAPI(const GURL& url) { |
815 return allowed_socket_origins_.find(url.host()) != | 823 return allowed_socket_origins_.find(url.host()) != |
816 allowed_socket_origins_.end(); | 824 allowed_socket_origins_.end(); |
817 } | 825 } |
818 | 826 |
819 } // namespace chrome | 827 } // namespace chrome |
OLD | NEW |