| 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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 blink::WebMIDIAccessor* accessor = | 801 blink::WebMIDIAccessor* accessor = |
| 802 GetContentClient()->renderer()->OverrideCreateMIDIAccessor(client); | 802 GetContentClient()->renderer()->OverrideCreateMIDIAccessor(client); |
| 803 if (accessor) | 803 if (accessor) |
| 804 return accessor; | 804 return accessor; |
| 805 | 805 |
| 806 return new RendererWebMIDIAccessorImpl(client); | 806 return new RendererWebMIDIAccessorImpl(client); |
| 807 } | 807 } |
| 808 | 808 |
| 809 void RendererBlinkPlatformImpl::getPluginList( | 809 void RendererBlinkPlatformImpl::getPluginList( |
| 810 bool refresh, | 810 bool refresh, |
| 811 const blink::WebSecurityOrigin& mainFrameOrigin, |
| 811 blink::WebPluginListBuilder* builder) { | 812 blink::WebPluginListBuilder* builder) { |
| 812 #if defined(ENABLE_PLUGINS) | 813 #if defined(ENABLE_PLUGINS) |
| 813 std::vector<WebPluginInfo> plugins; | 814 std::vector<WebPluginInfo> plugins; |
| 814 if (!plugin_refresh_allowed_) | 815 if (!plugin_refresh_allowed_) |
| 815 refresh = false; | 816 refresh = false; |
| 816 RenderThread::Get()->Send(new FrameHostMsg_GetPlugins(refresh, &plugins)); | 817 RenderThread::Get()->Send( |
| 818 new FrameHostMsg_GetPlugins(refresh, mainFrameOrigin, &plugins)); |
| 817 for (const WebPluginInfo& plugin : plugins) { | 819 for (const WebPluginInfo& plugin : plugins) { |
| 818 builder->addPlugin( | 820 builder->addPlugin( |
| 819 plugin.name, plugin.desc, | 821 plugin.name, plugin.desc, |
| 820 plugin.path.BaseName().AsUTF16Unsafe()); | 822 plugin.path.BaseName().AsUTF16Unsafe()); |
| 821 | 823 |
| 822 for (const WebPluginMimeType& mime_type : plugin.mime_types) { | 824 for (const WebPluginMimeType& mime_type : plugin.mime_types) { |
| 823 builder->addMediaTypeToLastPlugin( | 825 builder->addMediaTypeToLastPlugin( |
| 824 WebString::fromUTF8(mime_type.mime_type), mime_type.description); | 826 WebString::fromUTF8(mime_type.mime_type), mime_type.description); |
| 825 | 827 |
| 826 for (const auto& extension : mime_type.file_extensions) { | 828 for (const auto& extension : mime_type.file_extensions) { |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 return &trial_token_validator_; | 1320 return &trial_token_validator_; |
| 1319 } | 1321 } |
| 1320 | 1322 |
| 1321 void RendererBlinkPlatformImpl::workerContextCreated( | 1323 void RendererBlinkPlatformImpl::workerContextCreated( |
| 1322 const v8::Local<v8::Context>& worker) { | 1324 const v8::Local<v8::Context>& worker) { |
| 1323 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1325 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
| 1324 worker); | 1326 worker); |
| 1325 } | 1327 } |
| 1326 | 1328 |
| 1327 } // namespace content | 1329 } // namespace content |
| OLD | NEW |