| 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 | 760 |
| 763 //------------------------------------------------------------------------------ | 761 //------------------------------------------------------------------------------ |
| 764 | 762 |
| 765 WebBlobRegistry* RendererBlinkPlatformImpl::GetBlobRegistry() { | 763 WebBlobRegistry* RendererBlinkPlatformImpl::GetBlobRegistry() { |
| 766 // blob_registry_ can be NULL when running some tests. | 764 // blob_registry_ can be NULL when running some tests. |
| 767 return blob_registry_.get(); | 765 return blob_registry_.get(); |
| 768 } | 766 } |
| 769 | 767 |
| 770 //------------------------------------------------------------------------------ | 768 //------------------------------------------------------------------------------ |
| 771 | 769 |
| 772 void RendererBlinkPlatformImpl::SampleGamepads(WebGamepads& gamepads) { | 770 void RendererBlinkPlatformImpl::SampleGamepads(device::Gamepads& gamepads) { |
| 773 PlatformEventObserverBase* observer = | 771 PlatformEventObserverBase* observer = |
| 774 platform_event_observers_.Lookup(blink::kWebPlatformEventTypeGamepad); | 772 platform_event_observers_.Lookup(blink::kWebPlatformEventTypeGamepad); |
| 775 if (!observer) | 773 if (!observer) |
| 776 return; | 774 return; |
| 777 static_cast<RendererGamepadProvider*>(observer)->SampleGamepads(gamepads); | 775 static_cast<RendererGamepadProvider*>(observer)->SampleGamepads(gamepads); |
| 778 } | 776 } |
| 779 | 777 |
| 780 //------------------------------------------------------------------------------ | 778 //------------------------------------------------------------------------------ |
| 781 | 779 |
| 782 WebMediaRecorderHandler* | 780 WebMediaRecorderHandler* |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 //------------------------------------------------------------------------------ | 1273 //------------------------------------------------------------------------------ |
| 1276 void RendererBlinkPlatformImpl::RequestPurgeMemory() { | 1274 void RendererBlinkPlatformImpl::RequestPurgeMemory() { |
| 1277 // TODO(tasak|bashi): We should use ChildMemoryCoordinator here, but | 1275 // TODO(tasak|bashi): We should use ChildMemoryCoordinator here, but |
| 1278 // ChildMemoryCoordinator isn't always available as it's only initialized | 1276 // ChildMemoryCoordinator isn't always available as it's only initialized |
| 1279 // when kMemoryCoordinatorV0 is enabled. | 1277 // when kMemoryCoordinatorV0 is enabled. |
| 1280 // Use ChildMemoryCoordinator when memory coordinator is always enabled. | 1278 // Use ChildMemoryCoordinator when memory coordinator is always enabled. |
| 1281 base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); | 1279 base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); |
| 1282 } | 1280 } |
| 1283 | 1281 |
| 1284 } // namespace content | 1282 } // namespace content |
| OLD | NEW |