| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #include "components/startup_metric_utils/common/startup_metric.mojom.h" | 81 #include "components/startup_metric_utils/common/startup_metric.mojom.h" |
| 82 #include "components/subresource_filter/content/renderer/subresource_filter_agen
t.h" | 82 #include "components/subresource_filter/content/renderer/subresource_filter_agen
t.h" |
| 83 #include "components/subresource_filter/content/renderer/unverified_ruleset_deal
er.h" | 83 #include "components/subresource_filter/content/renderer/unverified_ruleset_deal
er.h" |
| 84 #include "components/task_scheduler_util/renderer/initialization.h" | 84 #include "components/task_scheduler_util/renderer/initialization.h" |
| 85 #include "components/version_info/version_info.h" | 85 #include "components/version_info/version_info.h" |
| 86 #include "components/visitedlink/renderer/visitedlink_slave.h" | 86 #include "components/visitedlink/renderer/visitedlink_slave.h" |
| 87 #include "components/web_cache/renderer/web_cache_impl.h" | 87 #include "components/web_cache/renderer/web_cache_impl.h" |
| 88 #include "content/public/common/content_constants.h" | 88 #include "content/public/common/content_constants.h" |
| 89 #include "content/public/common/content_switches.h" | 89 #include "content/public/common/content_switches.h" |
| 90 #include "content/public/common/url_constants.h" | 90 #include "content/public/common/url_constants.h" |
| 91 #include "content/public/renderer/content_media_client.h" |
| 91 #include "content/public/renderer/plugin_instance_throttler.h" | 92 #include "content/public/renderer/plugin_instance_throttler.h" |
| 92 #include "content/public/renderer/render_frame.h" | 93 #include "content/public/renderer/render_frame.h" |
| 93 #include "content/public/renderer/render_thread.h" | 94 #include "content/public/renderer/render_thread.h" |
| 94 #include "content/public/renderer/render_view.h" | 95 #include "content/public/renderer/render_view.h" |
| 95 #include "content/public/renderer/render_view_visitor.h" | 96 #include "content/public/renderer/render_view_visitor.h" |
| 96 #include "extensions/common/constants.h" | 97 #include "extensions/common/constants.h" |
| 97 #include "extensions/features/features.h" | 98 #include "extensions/features/features.h" |
| 98 #include "ipc/ipc_sync_channel.h" | 99 #include "ipc/ipc_sync_channel.h" |
| 100 #include "media/base/media_client.h" |
| 99 #include "media/media_features.h" | 101 #include "media/media_features.h" |
| 100 #include "net/base/net_errors.h" | 102 #include "net/base/net_errors.h" |
| 101 #include "ppapi/c/private/ppb_pdf.h" | 103 #include "ppapi/c/private/ppb_pdf.h" |
| 102 #include "ppapi/features/features.h" | 104 #include "ppapi/features/features.h" |
| 103 #include "ppapi/shared_impl/ppapi_switches.h" | 105 #include "ppapi/shared_impl/ppapi_switches.h" |
| 104 #include "printing/features/features.h" | 106 #include "printing/features/features.h" |
| 105 #include "services/service_manager/public/cpp/interface_provider.h" | 107 #include "services/service_manager/public/cpp/interface_provider.h" |
| 106 #include "third_party/WebKit/public/platform/URLConversion.h" | 108 #include "third_party/WebKit/public/platform/URLConversion.h" |
| 107 #include "third_party/WebKit/public/platform/WebCache.h" | 109 #include "third_party/WebKit/public/platform/WebCache.h" |
| 108 #include "third_party/WebKit/public/platform/WebCachePolicy.h" | 110 #include "third_party/WebKit/public/platform/WebCachePolicy.h" |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 469 |
| 468 for (auto& scheme : GetSchemesBypassingSecureContextCheckWhitelist()) { | 470 for (auto& scheme : GetSchemesBypassingSecureContextCheckWhitelist()) { |
| 469 WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist( | 471 WebSecurityPolicy::addSchemeToBypassSecureContextWhitelist( |
| 470 WebString::fromASCII(scheme)); | 472 WebString::fromASCII(scheme)); |
| 471 } | 473 } |
| 472 | 474 |
| 473 #if defined(OS_CHROMEOS) | 475 #if defined(OS_CHROMEOS) |
| 474 leak_detector_remote_client_.reset(new LeakDetectorRemoteClient()); | 476 leak_detector_remote_client_.reset(new LeakDetectorRemoteClient()); |
| 475 thread->AddObserver(leak_detector_remote_client_.get()); | 477 thread->AddObserver(leak_detector_remote_client_.get()); |
| 476 #endif | 478 #endif |
| 479 |
| 480 ::media::SetMediaClient(new ::content::ContentMediaClient(this)); |
| 477 } | 481 } |
| 478 | 482 |
| 479 void ChromeContentRendererClient::RenderFrameCreated( | 483 void ChromeContentRendererClient::RenderFrameCreated( |
| 480 content::RenderFrame* render_frame) { | 484 content::RenderFrame* render_frame) { |
| 481 new ChromeRenderFrameObserver(render_frame); | 485 new ChromeRenderFrameObserver(render_frame); |
| 482 | 486 |
| 483 bool should_whitelist_for_content_settings = | 487 bool should_whitelist_for_content_settings = |
| 484 base::CommandLine::ForCurrentProcess()->HasSwitch( | 488 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 485 switches::kInstantProcess); | 489 switches::kInstantProcess); |
| 486 extensions::Dispatcher* ext_dispatcher = NULL; | 490 extensions::Dispatcher* ext_dispatcher = NULL; |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 std::vector<base::SchedulerWorkerPoolParams>* params_vector, | 1520 std::vector<base::SchedulerWorkerPoolParams>* params_vector, |
| 1517 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | 1521 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
| 1518 index_to_traits_callback) { | 1522 index_to_traits_callback) { |
| 1519 DCHECK(params_vector); | 1523 DCHECK(params_vector); |
| 1520 DCHECK(index_to_traits_callback); | 1524 DCHECK(index_to_traits_callback); |
| 1521 // If this call fails, content will fall back to the default params. | 1525 // If this call fails, content will fall back to the default params. |
| 1522 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); | 1526 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); |
| 1523 *index_to_traits_callback = | 1527 *index_to_traits_callback = |
| 1524 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); | 1528 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); |
| 1525 } | 1529 } |
| OLD | NEW |