| 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 "content/renderer/renderer_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "cc/blink/context_provider_web_context.h" | 22 #include "cc/blink/context_provider_web_context.h" |
| 23 #include "components/scheduler/child/web_scheduler_impl.h" | 23 #include "components/scheduler/child/web_scheduler_impl.h" |
| 24 #include "components/scheduler/child/web_task_runner_impl.h" | 24 #include "components/scheduler/child/web_task_runner_impl.h" |
| 25 #include "components/scheduler/renderer/renderer_scheduler.h" | 25 #include "components/scheduler/renderer/renderer_scheduler.h" |
| 26 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" | 26 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" |
| 27 #include "components/url_formatter/url_formatter.h" | 27 #include "components/url_formatter/url_formatter.h" |
| 28 #include "content/child/database_util.h" | 28 #include "content/child/database_util.h" |
| 29 #include "content/child/file_info_util.h" | 29 #include "content/child/file_info_util.h" |
| 30 #include "content/child/fileapi/webfilesystem_impl.h" | 30 #include "content/child/fileapi/webfilesystem_impl.h" |
| 31 #include "content/child/indexed_db/webidbfactory_impl.h" | 31 #include "content/child/indexed_db/webidbfactory_impl.h" |
| 32 #include "content/child/npapi/npobject_util.h" | |
| 33 #include "content/child/quota_dispatcher.h" | 32 #include "content/child/quota_dispatcher.h" |
| 34 #include "content/child/quota_message_filter.h" | 33 #include "content/child/quota_message_filter.h" |
| 35 #include "content/child/simple_webmimeregistry_impl.h" | 34 #include "content/child/simple_webmimeregistry_impl.h" |
| 36 #include "content/child/storage_util.h" | 35 #include "content/child/storage_util.h" |
| 37 #include "content/child/thread_safe_sender.h" | 36 #include "content/child/thread_safe_sender.h" |
| 38 #include "content/child/web_database_observer_impl.h" | 37 #include "content/child/web_database_observer_impl.h" |
| 39 #include "content/child/web_url_loader_impl.h" | 38 #include "content/child/web_url_loader_impl.h" |
| 40 #include "content/child/webblobregistry_impl.h" | 39 #include "content/child/webblobregistry_impl.h" |
| 41 #include "content/child/webfileutilities_impl.h" | 40 #include "content/child/webfileutilities_impl.h" |
| 42 #include "content/child/webmessageportchannel_impl.h" | 41 #include "content/child/webmessageportchannel_impl.h" |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 std::vector<std::string> parsed_codec_ids; | 475 std::vector<std::string> parsed_codec_ids; |
| 477 media::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codec_ids, false); | 476 media::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codec_ids, false); |
| 478 if (mime_type_ascii.empty()) | 477 if (mime_type_ascii.empty()) |
| 479 return false; | 478 return false; |
| 480 return media::StreamParserFactory::IsTypeSupported( | 479 return media::StreamParserFactory::IsTypeSupported( |
| 481 mime_type_ascii, parsed_codec_ids); | 480 mime_type_ascii, parsed_codec_ids); |
| 482 } | 481 } |
| 483 | 482 |
| 484 WebString RendererBlinkPlatformImpl::MimeRegistry::mimeTypeForExtension( | 483 WebString RendererBlinkPlatformImpl::MimeRegistry::mimeTypeForExtension( |
| 485 const WebString& file_extension) { | 484 const WebString& file_extension) { |
| 486 if (IsPluginProcess()) | |
| 487 return SimpleWebMimeRegistryImpl::mimeTypeForExtension(file_extension); | |
| 488 | |
| 489 // The sandbox restricts our access to the registry, so we need to proxy | 485 // The sandbox restricts our access to the registry, so we need to proxy |
| 490 // these calls over to the browser process. | 486 // these calls over to the browser process. |
| 491 std::string mime_type; | 487 std::string mime_type; |
| 492 RenderThread::Get()->Send( | 488 RenderThread::Get()->Send( |
| 493 new MimeRegistryMsg_GetMimeTypeFromExtension( | 489 new MimeRegistryMsg_GetMimeTypeFromExtension( |
| 494 blink::WebStringToFilePath(file_extension).value(), &mime_type)); | 490 blink::WebStringToFilePath(file_extension).value(), &mime_type)); |
| 495 return base::ASCIIToUTF16(mime_type); | 491 return base::ASCIIToUTF16(mime_type); |
| 496 } | 492 } |
| 497 | 493 |
| 498 //------------------------------------------------------------------------------ | 494 //------------------------------------------------------------------------------ |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 } | 1305 } |
| 1310 | 1306 |
| 1311 //------------------------------------------------------------------------------ | 1307 //------------------------------------------------------------------------------ |
| 1312 | 1308 |
| 1313 blink::WebTrialTokenValidator* | 1309 blink::WebTrialTokenValidator* |
| 1314 RendererBlinkPlatformImpl::trialTokenValidator() { | 1310 RendererBlinkPlatformImpl::trialTokenValidator() { |
| 1315 return &trial_token_validator_; | 1311 return &trial_token_validator_; |
| 1316 } | 1312 } |
| 1317 | 1313 |
| 1318 } // namespace content | 1314 } // namespace content |
| OLD | NEW |