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

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

Issue 1467103003: Basic use implementation for MediaStream from Canvas: captureStream() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "content/public/renderer/content_renderer_client.h" 51 #include "content/public/renderer/content_renderer_client.h"
52 #include "content/renderer/battery_status/battery_status_dispatcher.h" 52 #include "content/renderer/battery_status/battery_status_dispatcher.h"
53 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" 53 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h"
54 #include "content/renderer/device_sensors/device_light_event_pump.h" 54 #include "content/renderer/device_sensors/device_light_event_pump.h"
55 #include "content/renderer/device_sensors/device_motion_event_pump.h" 55 #include "content/renderer/device_sensors/device_motion_event_pump.h"
56 #include "content/renderer/device_sensors/device_orientation_absolute_event_pump .h" 56 #include "content/renderer/device_sensors/device_orientation_absolute_event_pump .h"
57 #include "content/renderer/device_sensors/device_orientation_event_pump.h" 57 #include "content/renderer/device_sensors/device_orientation_event_pump.h"
58 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 58 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
59 #include "content/renderer/gamepad_shared_memory_reader.h" 59 #include "content/renderer/gamepad_shared_memory_reader.h"
60 #include "content/renderer/media/audio_decoder.h" 60 #include "content/renderer/media/audio_decoder.h"
61 #include "content/renderer/media/canvas_capture_handler.h"
61 #include "content/renderer/media/media_recorder_handler.h" 62 #include "content/renderer/media/media_recorder_handler.h"
62 #include "content/renderer/media/renderer_webaudiodevice_impl.h" 63 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
63 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" 64 #include "content/renderer/media/renderer_webmidiaccessor_impl.h"
64 #include "content/renderer/media/rtc_certificate_generator.h" 65 #include "content/renderer/media/rtc_certificate_generator.h"
65 #include "content/renderer/render_thread_impl.h" 66 #include "content/renderer/render_thread_impl.h"
66 #include "content/renderer/renderer_clipboard_delegate.h" 67 #include "content/renderer/renderer_clipboard_delegate.h"
67 #include "content/renderer/screen_orientation/screen_orientation_observer.h" 68 #include "content/renderer/screen_orientation/screen_orientation_observer.h"
68 #include "content/renderer/webclipboard_impl.h" 69 #include "content/renderer/webclipboard_impl.h"
69 #include "content/renderer/webgraphicscontext3d_provider_impl.h" 70 #include "content/renderer/webgraphicscontext3d_provider_impl.h"
70 #include "content/renderer/webpublicsuffixlist_impl.h" 71 #include "content/renderer/webpublicsuffixlist_impl.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #define WebScrollbarBehaviorImpl blink::WebScrollbarBehavior 132 #define WebScrollbarBehaviorImpl blink::WebScrollbarBehavior
132 #endif 133 #endif
133 134
134 #if defined(ENABLE_WEBRTC) 135 #if defined(ENABLE_WEBRTC)
135 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" 136 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
136 #endif 137 #endif
137 138
138 using blink::Platform; 139 using blink::Platform;
139 using blink::WebAudioDevice; 140 using blink::WebAudioDevice;
140 using blink::WebBlobRegistry; 141 using blink::WebBlobRegistry;
142 using blink::WebCanvasCaptureHandler;
141 using blink::WebDatabaseObserver; 143 using blink::WebDatabaseObserver;
142 using blink::WebFileInfo; 144 using blink::WebFileInfo;
143 using blink::WebFileSystem; 145 using blink::WebFileSystem;
144 using blink::WebGamepad; 146 using blink::WebGamepad;
145 using blink::WebGamepads; 147 using blink::WebGamepads;
146 using blink::WebIDBFactory; 148 using blink::WebIDBFactory;
147 using blink::WebMIDIAccessor; 149 using blink::WebMIDIAccessor;
148 using blink::WebMediaRecorderHandler; 150 using blink::WebMediaRecorderHandler;
151 using blink::WebMediaStream;
149 using blink::WebMediaStreamCenter; 152 using blink::WebMediaStreamCenter;
150 using blink::WebMediaStreamCenterClient; 153 using blink::WebMediaStreamCenterClient;
151 using blink::WebMimeRegistry; 154 using blink::WebMimeRegistry;
152 using blink::WebRTCPeerConnectionHandler; 155 using blink::WebRTCPeerConnectionHandler;
153 using blink::WebRTCPeerConnectionHandlerClient; 156 using blink::WebRTCPeerConnectionHandlerClient;
154 using blink::WebStorageNamespace; 157 using blink::WebStorageNamespace;
158 using blink::WebSize;
155 using blink::WebString; 159 using blink::WebString;
156 using blink::WebURL; 160 using blink::WebURL;
157 using blink::WebVector; 161 using blink::WebVector;
158 162
159 namespace content { 163 namespace content {
160 164
161 namespace { 165 namespace {
162 166
163 bool g_sandbox_enabled = true; 167 bool g_sandbox_enabled = true;
164 double g_test_device_light_data = -1; 168 double g_test_device_light_data = -1;
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 953
950 // static 954 // static
951 bool RendererBlinkPlatformImpl::SetSandboxEnabledForTesting(bool enable) { 955 bool RendererBlinkPlatformImpl::SetSandboxEnabledForTesting(bool enable) {
952 bool was_enabled = g_sandbox_enabled; 956 bool was_enabled = g_sandbox_enabled;
953 g_sandbox_enabled = enable; 957 g_sandbox_enabled = enable;
954 return was_enabled; 958 return was_enabled;
955 } 959 }
956 960
957 //------------------------------------------------------------------------------ 961 //------------------------------------------------------------------------------
958 962
963 WebCanvasCaptureHandler* RendererBlinkPlatformImpl::createCanvasCaptureHandler(
964 const WebSize& size,
965 WebMediaStream* stream) {
966 return new CanvasCaptureHandler(size, stream);
967 }
968
969 //------------------------------------------------------------------------------
970
959 blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::createSpeechSynthesizer( 971 blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::createSpeechSynthesizer(
960 blink::WebSpeechSynthesizerClient* client) { 972 blink::WebSpeechSynthesizerClient* client) {
961 return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client); 973 return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client);
962 } 974 }
963 975
964 //------------------------------------------------------------------------------ 976 //------------------------------------------------------------------------------
965 977
966 blink::WebGraphicsContext3D* 978 blink::WebGraphicsContext3D*
967 RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D( 979 RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
968 const blink::WebGraphicsContext3D::Attributes& attributes) { 980 const blink::WebGraphicsContext3D::Attributes& attributes) {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 //------------------------------------------------------------------------------ 1302 //------------------------------------------------------------------------------
1291 1303
1292 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1304 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1293 const blink::WebBatteryStatus& status) { 1305 const blink::WebBatteryStatus& status) {
1294 if (!g_test_battery_status_listener) 1306 if (!g_test_battery_status_listener)
1295 return; 1307 return;
1296 g_test_battery_status_listener->updateBatteryStatus(status); 1308 g_test_battery_status_listener->updateBatteryStatus(status);
1297 } 1309 }
1298 1310
1299 } // namespace content 1311 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698