Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 1483733002: Remove support for NPObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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/thread_safe_sender.h" 35 #include "content/child/thread_safe_sender.h"
37 #include "content/child/web_database_observer_impl.h" 36 #include "content/child/web_database_observer_impl.h"
38 #include "content/child/web_url_loader_impl.h" 37 #include "content/child/web_url_loader_impl.h"
39 #include "content/child/webblobregistry_impl.h" 38 #include "content/child/webblobregistry_impl.h"
40 #include "content/child/webfileutilities_impl.h" 39 #include "content/child/webfileutilities_impl.h"
41 #include "content/child/webmessageportchannel_impl.h" 40 #include "content/child/webmessageportchannel_impl.h"
42 #include "content/common/file_utilities_messages.h" 41 #include "content/common/file_utilities_messages.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 std::vector<std::string> parsed_codec_ids; 494 std::vector<std::string> parsed_codec_ids;
496 media::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codec_ids, false); 495 media::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codec_ids, false);
497 if (mime_type_ascii.empty()) 496 if (mime_type_ascii.empty())
498 return false; 497 return false;
499 return media::StreamParserFactory::IsTypeSupported( 498 return media::StreamParserFactory::IsTypeSupported(
500 mime_type_ascii, parsed_codec_ids); 499 mime_type_ascii, parsed_codec_ids);
501 } 500 }
502 501
503 WebString RendererBlinkPlatformImpl::MimeRegistry::mimeTypeForExtension( 502 WebString RendererBlinkPlatformImpl::MimeRegistry::mimeTypeForExtension(
504 const WebString& file_extension) { 503 const WebString& file_extension) {
505 if (IsPluginProcess())
506 return SimpleWebMimeRegistryImpl::mimeTypeForExtension(file_extension);
507
508 // The sandbox restricts our access to the registry, so we need to proxy 504 // The sandbox restricts our access to the registry, so we need to proxy
509 // these calls over to the browser process. 505 // these calls over to the browser process.
510 std::string mime_type; 506 std::string mime_type;
511 RenderThread::Get()->Send( 507 RenderThread::Get()->Send(
512 new MimeRegistryMsg_GetMimeTypeFromExtension( 508 new MimeRegistryMsg_GetMimeTypeFromExtension(
513 base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type)); 509 base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type));
514 return base::ASCIIToUTF16(mime_type); 510 return base::ASCIIToUTF16(mime_type);
515 } 511 }
516 512
517 //------------------------------------------------------------------------------ 513 //------------------------------------------------------------------------------
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 //------------------------------------------------------------------------------ 1284 //------------------------------------------------------------------------------
1289 1285
1290 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1286 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1291 const blink::WebBatteryStatus& status) { 1287 const blink::WebBatteryStatus& status) {
1292 if (!g_test_battery_status_listener) 1288 if (!g_test_battery_status_listener)
1293 return; 1289 return;
1294 g_test_battery_status_listener->updateBatteryStatus(status); 1290 g_test_battery_status_listener->updateBatteryStatus(status);
1295 } 1291 }
1296 1292
1297 } // namespace content 1293 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698