| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #include "content/renderer/media_capture_from_element/canvas_capture_handler.h" | 62 #include "content/renderer/media_capture_from_element/canvas_capture_handler.h" |
| 63 #include "content/renderer/media_capture_from_element/html_audio_element_capture
r_source.h" | 63 #include "content/renderer/media_capture_from_element/html_audio_element_capture
r_source.h" |
| 64 #include "content/renderer/media_capture_from_element/html_video_element_capture
r_source.h" | 64 #include "content/renderer/media_capture_from_element/html_video_element_capture
r_source.h" |
| 65 #include "content/renderer/media_recorder/media_recorder_handler.h" | 65 #include "content/renderer/media_recorder/media_recorder_handler.h" |
| 66 #include "content/renderer/mojo/blink_interface_provider_impl.h" | 66 #include "content/renderer/mojo/blink_interface_provider_impl.h" |
| 67 #include "content/renderer/render_thread_impl.h" | 67 #include "content/renderer/render_thread_impl.h" |
| 68 #include "content/renderer/renderer_clipboard_delegate.h" | 68 #include "content/renderer/renderer_clipboard_delegate.h" |
| 69 #include "content/renderer/webclipboard_impl.h" | 69 #include "content/renderer/webclipboard_impl.h" |
| 70 #include "content/renderer/webgraphicscontext3d_provider_impl.h" | 70 #include "content/renderer/webgraphicscontext3d_provider_impl.h" |
| 71 #include "content/renderer/webpublicsuffixlist_impl.h" | 71 #include "content/renderer/webpublicsuffixlist_impl.h" |
| 72 #include "device/gamepad/public/cpp/gamepads.h" |
| 72 #include "gpu/command_buffer/client/gles2_interface.h" | 73 #include "gpu/command_buffer/client/gles2_interface.h" |
| 73 #include "gpu/config/gpu_info.h" | 74 #include "gpu/config/gpu_info.h" |
| 74 #include "gpu/ipc/client/gpu_channel_host.h" | 75 #include "gpu/ipc/client/gpu_channel_host.h" |
| 75 #include "gpu/ipc/common/gpu_stream_constants.h" | 76 #include "gpu/ipc/common/gpu_stream_constants.h" |
| 76 #include "ipc/ipc_sync_message_filter.h" | 77 #include "ipc/ipc_sync_message_filter.h" |
| 77 #include "media/audio/audio_output_device.h" | 78 #include "media/audio/audio_output_device.h" |
| 78 #include "media/blink/webcontentdecryptionmodule_impl.h" | 79 #include "media/blink/webcontentdecryptionmodule_impl.h" |
| 79 #include "media/filters/stream_parser_factory.h" | 80 #include "media/filters/stream_parser_factory.h" |
| 80 #include "ppapi/features/features.h" | 81 #include "ppapi/features/features.h" |
| 81 #include "services/service_manager/public/cpp/connector.h" | 82 #include "services/service_manager/public/cpp/connector.h" |
| 82 #include "services/service_manager/public/cpp/interface_provider.h" | 83 #include "services/service_manager/public/cpp/interface_provider.h" |
| 83 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" | 84 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" |
| 84 #include "storage/common/database/database_identifier.h" | 85 #include "storage/common/database/database_identifier.h" |
| 85 #include "storage/common/quota/quota_types.h" | 86 #include "storage/common/quota/quota_types.h" |
| 86 #include "third_party/WebKit/public/platform/BlameContext.h" | 87 #include "third_party/WebKit/public/platform/BlameContext.h" |
| 87 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 88 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
| 88 #include "third_party/WebKit/public/platform/URLConversion.h" | 89 #include "third_party/WebKit/public/platform/URLConversion.h" |
| 89 #include "third_party/WebKit/public/platform/WebAudioLatencyHint.h" | 90 #include "third_party/WebKit/public/platform/WebAudioLatencyHint.h" |
| 90 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 91 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
| 91 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h" | 92 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h" |
| 92 #include "third_party/WebKit/public/platform/WebFileInfo.h" | 93 #include "third_party/WebKit/public/platform/WebFileInfo.h" |
| 93 #include "third_party/WebKit/public/platform/WebGamepads.h" | |
| 94 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 94 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
| 95 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" | 95 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" |
| 96 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" | 96 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" |
| 97 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 97 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
| 98 #include "third_party/WebKit/public/platform/WebURL.h" | 98 #include "third_party/WebKit/public/platform/WebURL.h" |
| 99 #include "third_party/WebKit/public/platform/WebVector.h" | 99 #include "third_party/WebKit/public/platform/WebVector.h" |
| 100 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionListener.h" | 100 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eMotionListener.h" |
| 101 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationListener.h" | 101 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationListener.h" |
| 102 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" | 102 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" |
| 103 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 103 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 #endif | 141 #endif |
| 142 | 142 |
| 143 using blink::Platform; | 143 using blink::Platform; |
| 144 using blink::WebAudioDevice; | 144 using blink::WebAudioDevice; |
| 145 using blink::WebAudioLatencyHint; | 145 using blink::WebAudioLatencyHint; |
| 146 using blink::WebBlobRegistry; | 146 using blink::WebBlobRegistry; |
| 147 using blink::WebCanvasCaptureHandler; | 147 using blink::WebCanvasCaptureHandler; |
| 148 using blink::WebDatabaseObserver; | 148 using blink::WebDatabaseObserver; |
| 149 using blink::WebFileInfo; | 149 using blink::WebFileInfo; |
| 150 using blink::WebFileSystem; | 150 using blink::WebFileSystem; |
| 151 using blink::WebGamepad; | |
| 152 using blink::WebGamepads; | |
| 153 using blink::WebIDBFactory; | 151 using blink::WebIDBFactory; |
| 154 using blink::WebImageCaptureFrameGrabber; | 152 using blink::WebImageCaptureFrameGrabber; |
| 155 using blink::WebMIDIAccessor; | 153 using blink::WebMIDIAccessor; |
| 156 using blink::WebMediaPlayer; | 154 using blink::WebMediaPlayer; |
| 157 using blink::WebMediaRecorderHandler; | 155 using blink::WebMediaRecorderHandler; |
| 158 using blink::WebMediaStream; | 156 using blink::WebMediaStream; |
| 159 using blink::WebMediaStreamCenter; | 157 using blink::WebMediaStreamCenter; |
| 160 using blink::WebMediaStreamCenterClient; | 158 using blink::WebMediaStreamCenterClient; |
| 161 using blink::WebMediaStreamTrack; | 159 using blink::WebMediaStreamTrack; |
| 162 using blink::WebRTCPeerConnectionHandler; | 160 using blink::WebRTCPeerConnectionHandler; |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 | 776 |
| 779 //------------------------------------------------------------------------------ | 777 //------------------------------------------------------------------------------ |
| 780 | 778 |
| 781 WebBlobRegistry* RendererBlinkPlatformImpl::GetBlobRegistry() { | 779 WebBlobRegistry* RendererBlinkPlatformImpl::GetBlobRegistry() { |
| 782 // blob_registry_ can be NULL when running some tests. | 780 // blob_registry_ can be NULL when running some tests. |
| 783 return blob_registry_.get(); | 781 return blob_registry_.get(); |
| 784 } | 782 } |
| 785 | 783 |
| 786 //------------------------------------------------------------------------------ | 784 //------------------------------------------------------------------------------ |
| 787 | 785 |
| 788 void RendererBlinkPlatformImpl::SampleGamepads(WebGamepads& gamepads) { | 786 void RendererBlinkPlatformImpl::SampleGamepads(device::Gamepads& gamepads) { |
| 789 PlatformEventObserverBase* observer = | 787 PlatformEventObserverBase* observer = |
| 790 platform_event_observers_.Lookup(blink::kWebPlatformEventTypeGamepad); | 788 platform_event_observers_.Lookup(blink::kWebPlatformEventTypeGamepad); |
| 791 if (!observer) | 789 if (!observer) |
| 792 return; | 790 return; |
| 793 static_cast<RendererGamepadProvider*>(observer)->SampleGamepads(gamepads); | 791 static_cast<RendererGamepadProvider*>(observer)->SampleGamepads(gamepads); |
| 794 } | 792 } |
| 795 | 793 |
| 796 //------------------------------------------------------------------------------ | 794 //------------------------------------------------------------------------------ |
| 797 | 795 |
| 798 WebMediaRecorderHandler* | 796 WebMediaRecorderHandler* |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 //------------------------------------------------------------------------------ | 1289 //------------------------------------------------------------------------------ |
| 1292 void RendererBlinkPlatformImpl::RequestPurgeMemory() { | 1290 void RendererBlinkPlatformImpl::RequestPurgeMemory() { |
| 1293 // TODO(tasak|bashi): We should use ChildMemoryCoordinator here, but | 1291 // TODO(tasak|bashi): We should use ChildMemoryCoordinator here, but |
| 1294 // ChildMemoryCoordinator isn't always available as it's only initialized | 1292 // ChildMemoryCoordinator isn't always available as it's only initialized |
| 1295 // when kMemoryCoordinatorV0 is enabled. | 1293 // when kMemoryCoordinatorV0 is enabled. |
| 1296 // Use ChildMemoryCoordinator when memory coordinator is always enabled. | 1294 // Use ChildMemoryCoordinator when memory coordinator is always enabled. |
| 1297 base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); | 1295 base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); |
| 1298 } | 1296 } |
| 1299 | 1297 |
| 1300 } // namespace content | 1298 } // namespace content |
| OLD | NEW |