| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 info.mime_types[i].additional_param_values, | 683 info.mime_types[i].additional_param_values, |
| 684 ¶ms.attributeNames, ¶ms.attributeValues); | 684 ¶ms.attributeNames, ¶ms.attributeValues); |
| 685 break; | 685 break; |
| 686 } | 686 } |
| 687 } | 687 } |
| 688 if (params.mimeType.isNull() && (actual_mime_type.size() > 0)) { | 688 if (params.mimeType.isNull() && (actual_mime_type.size() > 0)) { |
| 689 // Webkit might say that mime type is null while we already know the | 689 // Webkit might say that mime type is null while we already know the |
| 690 // actual mime type via ChromeViewHostMsg_GetPluginInfo. In that case | 690 // actual mime type via ChromeViewHostMsg_GetPluginInfo. In that case |
| 691 // we should use what we know since WebpluginDelegateProxy does some | 691 // we should use what we know since WebpluginDelegateProxy does some |
| 692 // specific initializations based on this information. | 692 // specific initializations based on this information. |
| 693 params.mimeType = WebString::fromUTF8(actual_mime_type.c_str()); | 693 params.mimeType = WebString::fromUTF8(actual_mime_type); |
| 694 } | 694 } |
| 695 | 695 |
| 696 ContentSettingsObserver* observer = | 696 ContentSettingsObserver* observer = |
| 697 ContentSettingsObserver::Get(render_frame); | 697 ContentSettingsObserver::Get(render_frame); |
| 698 | 698 |
| 699 const ContentSettingsType content_type = | 699 const ContentSettingsType content_type = |
| 700 ShouldUseJavaScriptSettingForPlugin(info) | 700 ShouldUseJavaScriptSettingForPlugin(info) |
| 701 ? CONTENT_SETTINGS_TYPE_JAVASCRIPT | 701 ? CONTENT_SETTINGS_TYPE_JAVASCRIPT |
| 702 : CONTENT_SETTINGS_TYPE_PLUGINS; | 702 : CONTENT_SETTINGS_TYPE_PLUGINS; |
| 703 | 703 |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 std::vector<base::SchedulerWorkerPoolParams>* params_vector, | 1523 std::vector<base::SchedulerWorkerPoolParams>* params_vector, |
| 1524 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | 1524 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
| 1525 index_to_traits_callback) { | 1525 index_to_traits_callback) { |
| 1526 DCHECK(params_vector); | 1526 DCHECK(params_vector); |
| 1527 DCHECK(index_to_traits_callback); | 1527 DCHECK(index_to_traits_callback); |
| 1528 // If this call fails, content will fall back to the default params. | 1528 // If this call fails, content will fall back to the default params. |
| 1529 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); | 1529 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); |
| 1530 *index_to_traits_callback = | 1530 *index_to_traits_callback = |
| 1531 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); | 1531 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); |
| 1532 } | 1532 } |
| OLD | NEW |